Skip to content

Rules API: Response code is internal server error even if caused by bad request #234

@matej-g

Description

@matej-g

We are currently always returning 500 if (un)marhsalling of the rules provided in the YAML by the user fails. However, more often than not, the unmarshalling will fail due to user error, because for example the provided YAML is not valid. We should be able to detect these cases, and if that happens, return 400 instead. (This can also lead to false positives when it comes to monitoring, since it could artificially increase number of 500 server responses, even though these are user errors)

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