Skip to content

Add a hook that is called whenever an error occurs #5112

@mathijs-ixon

Description

@mathijs-ixon

Describe the feature

When adding a path configuration through the API in which something is wrong, there is currently no automated way to get the error message back (except for parsing the logs).

For example, when username or password for an RTSP source are incorrect MediaMTX logs:
2025/10/20 16:32:20 ERR [path ***] [RTSP source] bad status code: 401 (Unauthorized)

It would be very nice if this error message could be passed through a hook (runOnError?) so it can make its way further into an automated system. The other option would be that error messages would be retrievable through the API somehow, though I feel that would be a more complicated thing to work with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions