8000 chore: correct 500 -> 404 by Emyrk · Pull Request #11129 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: correct 500 -> 404 #11129

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

Merged
merged 3 commits into from
Dec 12, 2023
Merged

chore: correct 500 -> 404 #11129

merged 3 commits into from
Dec 12, 2023

Conversation

Emyrk
Copy link
Member
@Emyrk Emyrk commented Dec 11, 2023

Makes 401 errors return at 404 instead of 500

Copy link
Member
@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

What problem is this addressing?
If this breaks no unit tests, that makes me suspicious that we have a gap in test coverage.

@Emyrk
Copy link
Member Author
Emyrk commented Dec 11, 2023

What problem is this addressing? If this breaks no unit tests, that makes me suspicious that we have a gap in test coverage.

A custom was reporting they had 500 error alerting. The 500 error was "detail":"unauthorized: rbac: forbidden". This should return as a 404 and not trigger any monitoring for 500s.

@johnstcn
Copy link
Member

What problem is this addressing? If this breaks no unit tests, that makes me suspicious that we have a gap in test coverage.

A custom was reporting they had 500 error alerting. The 500 error was "detail":"unauthorized: rbac: forbidden". This should return as a 404 and not trigger any monitoring for 500s.

Should we then add a test that an expired agent token does not trigger a 5xx? Just to avoid an accidental regression for this customer in future.

Copy link
Member
@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but we should have a test to cover this behaviour so we don't accidentally push a regression in the future.

@Emyrk Emyrk merged commit dba0dfa into main Dec 12, 2023
@Emyrk Emyrk deleted the stevenmasley/agent_404 branch December 12, 2023 21:14
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0