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

TokenError should be passed the HTTP status code #127

Open
getsnoopy opened this issue Jul 15, 2020 · 0 comments · May be fixed by #131
Open

TokenError should be passed the HTTP status code #127

getsnoopy opened this issue Jul 15, 2020 · 0 comments · May be fixed by #131

Comments

@getsnoopy
Copy link

getsnoopy commented Jul 15, 2020

It seems like when a TokenError is generated, it isn't passed the status code that was generated by the upstream service. This can be seen in OAuth2Strategy#parseErrorResponse. It should pass the status parameter through to the TokenError constructor as the 4th parameter. As a part of this, the default status code created by TokenError should be 400, not 500, as it looks like the default error code is invalid_request, which maps to the former instead of the latter.

@getsnoopy getsnoopy linked a pull request Aug 26, 2020 that will close this issue
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 a pull request may close this issue.

1 participant