When errors/exception occur in the system, the API Manager throws XML-based error responses by default. To change the format of the error response that is sent to the client, you change the auth failure handler in the the <AM_HOME>/repository/deployment/server/synapse-configs/default/sequences/_auth_failure_handler.xml
file file. Given below is the default configuration:
...