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

Replace InvalidArgumentError with ServerError #67

Open
Uzlopak opened this issue Nov 15, 2021 · 3 comments
Open

Replace InvalidArgumentError with ServerError #67

Uzlopak opened this issue Nov 15, 2021 · 3 comments
Labels
compliance 📜 OAuth 2.0 standard compliance tests 🧪 Relates to tests

Comments

@Uzlopak
Copy link
Collaborator

Uzlopak commented Nov 15, 2021

InvalidArgumentError or invalid_argument is not a oauth2-error. It is used by oauth2-server to indicate errors like that specific internal implementation is wrong. E.g. Request is missing header. Also the HttpStatusCode of 500 clearly indicates that it is a ServerError and not something what the enduser can control.

https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1
https://datatracker.ietf.org/doc/html/rfc6749#section-4.2.2.1

@jankapunkt
Copy link
Member

Please also add, which parts of the code are affected and which tests need to be updated.

@jankapunkt jankapunkt added compliance 📜 OAuth 2.0 standard compliance tests 🧪 Relates to tests labels Nov 16, 2021
@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Nov 16, 2021

Its actually scattered all over the place. It is everywhere used where an InternalServerError should be thrown because the implementor made an implementation error.

@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Nov 16, 2021

We could also just patch the InvalidArgumentError to extend ServerError or change invalid_argument to server_error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compliance 📜 OAuth 2.0 standard compliance tests 🧪 Relates to tests
Projects
None yet
Development

No branches or pull requests

2 participants