-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat(auth): return GNAP 404 error if token cannot be rotated #3101
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
c3c35cb
to
f053a0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up. For context, this is to match the spec update here: interledger/open-payments#518
@@ -164,7 +164,7 @@ async function rotateToken( | |||
const errorMessage = | |||
error instanceof Error ? error.message : 'Could not rotate token' | |||
throw new GNAPServerRouteError( | |||
400, | |||
404, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we throw in the other service methods that may lead to this 404? or do we just want this error message for the if (!newToken)
case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @njlie
Changes proposed in this pull request
Context
GNAPServerRouteError
if invalid token is used during rotation #3100Checklist
fixes #number
user-docs
label (if necessary)