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

Configure Error handling to not trigger Sentry on 404 #231

Closed
Brend-Smits opened this issue Jun 18, 2020 · 2 comments · Fixed by #246
Closed

Configure Error handling to not trigger Sentry on 404 #231

Brend-Smits opened this issue Jun 18, 2020 · 2 comments · Fixed by #246
Assignees
Labels
bug Something isn't working

Comments

@Brend-Smits
Copy link
Member

Describe the bug
Since we are returning 404 in the API when there is nothing to be returned........ Errors are send to Sentry constantly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to project-detail page of non-highlighted project
  2. Check your console, it will show error 404 highlight not found (that's ok, there is no highlight for this project)
  3. Check sentry, error will be logged.

Expected behavior
Certain 404's to not be logged in Sentry.

Screenshots
https://gyazo.com/aa5ce192347d3dcd9c9de7dee0ad5748

@Brend-Smits Brend-Smits added the bug Something isn't working label Jun 18, 2020
@StijnGroenen
Copy link
Member

Error code 404 should not be used when there is nothing to return. The 400-499 range of HTTP status codes indicate a client error. When the list of highlights is empty, it is not a client error.
In my opinion, status code 204 (No content) should be used or 200 (OK) with an empty array as the body.

@Brend-Smits
Copy link
Member Author

Error code 404 should not be used when there is nothing to return. The 400-499 range of HTTP status codes indicate a client error. When the list of highlights is empty, it is not a client error.
In my opinion, status code 204 (No content) should be used or 200 (OK) with an empty array as the body.

Yes please, except we have little time. This should be fixed properly after the initial release. DigitalExcellence/dex-backend#207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants