Skip to content

How to get 401 from useJWT() plugin to return with 401 instead of 500 using Express #3140

Discussion options

You must be logged in to vote

Actually, it should already bubble up. The error thrown contains an http.code extension that should set the status code on the response, this is a Yoga feature. If it's not bubbling up, it is probably a bug :-) Can you open an issue with a simple reproduction on Stackblitz for example ?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@peterklingelhofer
Comment options

@EmrysMyrddin
Comment options

Answer selected by peterklingelhofer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants