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

Properly return errors in Auth Interaction server #3029

Open
2 tasks
mkurapov opened this issue Oct 11, 2024 · 0 comments · May be fixed by #3094
Open
2 tasks

Properly return errors in Auth Interaction server #3029

mkurapov opened this issue Oct 11, 2024 · 0 comments · May be fixed by #3094
Assignees
Labels
pkg: auth Changes in the GNAP auth package.

Comments

@mkurapov
Copy link
Contributor

mkurapov commented Oct 11, 2024

Context

Currently, in the auth server routes (Open Payments & some of the front channel routes), we are throwing GNAPServerRouteErrors, and properly catching them in gnapServerErrorMiddleware in order to return a well formatted GNAP error object that is defined in the GNAP spec. However, we are not doing the same for /grant/:id/:nonce/:choice /grant/:id/:nonce, the two routes exposed in the "Interaction Server".

Relevant OpenAPI docs

Todos

  • Add gnapServerErrorMiddleware handler in the "Interaction Server" routes, add tests accordingly
  • Update the IDP spec to display the different possible error objects for each route. A good idea might be to define all the possible GNAP errors we throw as components/schemas, and use them in each of the routes (see OpenAPI docs above)
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Oct 11, 2024
@mkurapov mkurapov added the pkg: auth Changes in the GNAP auth package. label Oct 11, 2024
@njlie njlie self-assigned this Nov 8, 2024
@njlie njlie linked a pull request Nov 8, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: auth Changes in the GNAP auth package.
Projects
Status: Ready for Review
Development

Successfully merging a pull request may close this issue.

2 participants