[keycloak-dev] Exception handling for own REST API - is it possible to register own javax.ws.rs.ext.ExceptionMapper?

Vlastimil Elias velias at redhat.com
Thu Jun 9 06:42:06 EDT 2016


Hi,

I'm implementing my own REST endpoint using RealmResourceProvider and 
I'm thinking how to perform error handling (which is not covered in 
example).
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.
I get common error page with:

*Stack Trace*
org.jboss.resteasy.spi.UnhandledException: 
com.redhat.developer.keycloak.rest.InvalidParametersException: email 
param must be specified

Thansk in advance.

Vlastimil

-- 
Vlastimil Elias
Principal Software Engineer
Red Hat Developer | Engineering

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160609/221590bb/attachment.html 


More information about the keycloak-dev mailing list