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

oauth2 misleading message on error 405 (wrong method) getting token #550

Closed
jarekczek opened this issue Aug 30, 2018 · 1 comment

Comments

@jarekczek
Copy link

commented Aug 30, 2018

When I get 405 Method Not Allowed error from oauth2 server, ktor gives me an error message: "unsupported content type /".

I play with ktor and keycloak. When I forgot to set the requestMethod in oauth2 settings, I got this misleading message. The content is empty. In this case ktor should report 405 and not try to decode the content.

Probably in case of any unexpected http status, it should be reported as an error. Second thing, decoding should not be attempted on empty content, give a better message instead.

@jarekczek jarekczek changed the title misleading message on error 405 (wrong method) getting token oauth2 misleading message on error 405 (wrong method) getting token Aug 30, 2018

@cy6erGn0m cy6erGn0m self-assigned this Oct 22, 2018

cy6erGn0m added a commit that referenced this issue Oct 22, 2018
@cy6erGn0m

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

Fixed in 1.0.0-beta-2

@cy6erGn0m cy6erGn0m closed this Oct 24, 2018

cy6erGn0m added a commit that referenced this issue Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.