[keycloak-user] Error message display

Bill Burke bburke at redhat.com
Mon Dec 14 10:09:02 EST 2015


What are you doing?  Registration?  Login?  What?  You have to handle 
the error there and redirect to the appropriate error page:

org.keycloak.services.ErrorPage {

     public static Response error(KeycloakSession session, String 
message, Object... parameters) {
         return 
session.getProvider(LoginFormsProvider.class).setError(message, 
parameters).createErrorPage();
     }


}

Where message corresponds to a message bundle and parameters are passed 
into this.


On 12/14/2015 5:30 AM, Frank van Veen wrote:
> Hi,
>
> I am trying to create and display my own error messages in keycloak. In
> this case an error occurred in an inherited method from the
> UserModelDelegate.
>
> Currently the only error message I have been able to display is
> “*Error!*An unexpected server error has occurred”. This isn’t very
> helpful for our users.
>
> This is a screenshot of a successful operation:
> https://i.imgur.com/z9dMvxG.png
>
> This is a screenshot of a unsuccessful operation:
> https://i.imgur.com/LN89Qti.png
>
> It would be nice if I could display “Error! The maximum length of
> Description is 20 characters”.
>
> Any help would be appreciated!
>
> Sincerely,
>
> Frank van Veen
>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-user mailing list