Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate rules client status code #218

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

saswatamcode
Copy link
Member

Currently, the API returns 200 status codes for all responses of the rules client. So even if the rules file in a PUT request is invalid, API returns 200 with the body request body failed rule group validation as observed in #198.

This PR ensures that the correct HTTP status code received from the rules client is propagated by the API, for the rules/raw endpoint.

Fixes MON-2176.

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Copy link
Contributor

@matej-g matej-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for swiftly jumping in @saswatamcode! I'm wondering whether we should add a test case for this in here or still in #198 🤔. Maybe we could finally merge the tests PR, rebase this PR and add the test / remove TODO as part of this?

@saswatamcode
Copy link
Member Author

Yes, the test can be added here once the rule tests PR is merged! 🙂

@squat squat merged commit b38a986 into observatorium:main Jan 25, 2022
@jessicalins
Copy link
Contributor

@saswatamcode awesome! I'll re-add the test in #198 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants