[keycloak-user] Get message for ModelException in admin-client

Leonardo Loch Zanivan leonardo.zanivan at gmail.com
Wed May 6 13:31:41 EDT 2015


Unfortunatelly I think it's not possible right now.

Admin client uses Admin REST API, which isn't handling errors correctly.

If you try to reset a password using Admin interface you will get a generic
error 500 saying "Failed to reset user password".

In the server the stacktrace shows:
Caused by: org.jboss.resteasy.spi.UnhandledException:
org.keycloak.models.ModelException: invalidPasswordMinLengthMessage

We could fill a JIRA to handle ModelException using JAX-RS exception
handlers, so the response will have the correct error and we could show a
better error message.

On Wed, May 6, 2015 at 2:10 PM Benjamin Hansmann [alphaApps] <
b.hansmann at alphaapps.de> wrote:

> Is one able to get an error message from the resetPassword method of
> admin-client if it somehow failed to reset the password, like when the
> password is too short or does not comply with the password policy?
>
> It throws an InternalServerErrorException in that case. On the server
> side there seems to be a ModelException:
> invalidPasswordMinLengthMessage. That information is lost...
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150506/27e5e63a/attachment.html 


More information about the keycloak-user mailing list