[keycloak-user] Is there a way to return a customized error message from servlet interception of keycloak.

rafterjiang rafterjiang at hotmail.com
Mon Jun 19 15:59:37 EDT 2017


We are using spring boot to do the web api/url authentication. We have set up
the auth roles and patterns in application.properties. Everything works
fine. Only problem is, when web API auth fails,keycloak returns a either 401
or 403 to client. For example:
{
    "status": "401",
    "errorCode": "SERVER_ERROR",
    "message": "internal server error"
}

or 

{
    "status": "403",
    "errorCode": "SERVER_ERROR",
    "message": "internal server error"
}

The error message is too vague, is it possible to customize the error
message so client knows clearly what goes wrong?



--
View this message in context: http://keycloak-user.88327.x6.nabble.com/Is-there-a-way-to-return-a-customized-error-message-from-servlet-interception-of-keycloak-tp3941.html
Sent from the keycloak-user mailing list archive at Nabble.com.


More information about the keycloak-user mailing list