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

RestOauthController fails to encode errors because of issue with DefaultCallbackErrorHandler #494

Open
snimavat opened this issue Apr 1, 2022 · 1 comment

Comments

@snimavat
Copy link

snimavat commented Apr 1, 2022

RestOauthController Would fail with below error when it encounters UserNotFoundException

java.lang.Integer.encodeAsURL() is applicable

Because Default call back error handler puts integer value in params as params.error = FORBIDDEN.value() and we cant do intValue.encodeAsUrl

In short, if DefaultCallbackErrorHandler.groovy puts any integer values in returned map, it would cause error at this line this line

We have Custom Oauth user details service which throws UserNotFoundException if the oauth user does not exist in our database.

@snimavat
Copy link
Author

snimavat commented Apr 1, 2022

Looks like codecs broken, encodeAsUrl fails on any object. None of the codecs works.
No idea why,

I had to put @import([CodecsConfiguration]) on Application.groovy to get codecs working.
All good after that.

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

No branches or pull requests

1 participant