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

api-server: catch invalid token error #946

Merged
merged 1 commit into from
May 23, 2024

Conversation

koonpeng
Copy link
Collaborator

What's new

DecodeError is not broad enough to catch errors that might cause auth to fail (e.g. expired tokens). The result is that the error is uncaught and the server returns 500. This fixes it so it properly return 401.

Self-checks

  • I have prototyped this new feature (if necessary) on Figma
  • I'm familiar with and follow this Typescript guideline
  • I added unit-tests for new components
  • I tried testing edge cases
  • I tested the behavior of the components that interact with the backend, with an e2e test

Discussion

Signed-off-by: Teo Koon Peng <[email protected]>
@koonpeng koonpeng requested a review from aaronchongth May 23, 2024 07:48
@aaronchongth aaronchongth merged commit 9136efd into deploy/hammer May 23, 2024
2 checks passed
@aaronchongth aaronchongth deleted the koonpeng/catch-invalid-token-error branch May 23, 2024 09:12
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.

2 participants