<div dir="ltr">Providers would also need to be registered in KeycloakApplication. We don't support that at the moment at least. You could add try/catch to your code and return an extension of WebApplicationException [1]. That way you can define how the response should look like. <div><br></div><div>[1] <a href="https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/services/ErrorResponseException.java">https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/services/ErrorResponseException.java</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 June 2016 at 12:42, Vlastimil Elias <span dir="ltr"><<a href="mailto:velias@redhat.com" target="_blank">velias@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
I'm implementing my own REST endpoint using RealmResourceProvider
and I'm thinking how to perform error handling (which is not covered
in example).<br>
Is it possible to register my javax.ws.rs.ext.ExceptionMapper
subclass to handle my exceptions? I tried to add subclass of it
annotated with javax.ws.rs.ext.Provider into my code but it is not
used.<br>
I get common error page with:<br>
<br>
<b>Stack Trace</b><br>
org.jboss.resteasy.spi.UnhandledException:
com.redhat.developer.keycloak.rest.InvalidParametersException: email
param must be specified<br>
<br>
Thansk in advance.<span class="HOEnZb"><font color="#888888"><br>
<br>
Vlastimil<br>
<br>
<pre cols="72">--
Vlastimil Elias
Principal Software Engineer
Red Hat Developer | Engineering</pre>
</font></span></div>
<br>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></blockquote></div><br></div>