<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Thanks, looks good. Maybe your REST example should be extended to
contain example of error handling using this exception.<br>
<br>
Cheers<br>
<br>
Vlastimil<br>
<br>
<br>
<div class="moz-cite-prefix">On 13.6.2016 08:56, Stian Thorgersen
wrote:<br>
</div>
<blockquote
cite="mid:CAJgngAfpQnbEuX3fHO70f6s1eA0kd=Dzd7gUinz-pQ0g6A9Keg@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Vlastimil Elias
Principal Software Engineer
Red Hat Developer | Engineering</pre>
</body>
</html>