[keycloak-user] Custom Error Page

Troy Wilson troyboy.wilson at gmail.com
Thu Mar 23 20:29:44 EDT 2017


Hi everyone,

I was wondering if anyone has any ideas on how to get keycloak to display
custom error pages.

Background:

We have some custom providers that may throw exceptions.
If one of these exceptions is thrown, we get a stack trace.
We can turn off the stack trace by changing the "stack-trace-on-error"
attribute as described on
https://docs.jboss.org/author/display/WFLY8/Undertow+subsystem+configuration
 .
When this attribute is set to none, the server responds with the following
response (copied from fiddler proxy server)

HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Type: text/html;charset=UTF-8
Content-Length: 80
Date: Fri, 24 Mar 2017 00:16:14 GMT

<html><head><title>Error</title></head><body>Internal Server
Error</body></html>


What we would like to do is, display a page in keeping with the theme of
the application, ideally be able to call the
<keycloak-root>/theme/<theme>/login/error.ftl file.

Any help / guidance on this would be greatly appreciated.

Troy


More information about the keycloak-user mailing list