This section describes 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 <AM_HOME>/repository/deployment/server/synapse-configs/auth_failure_handler.xml
file. Given below is the default configuration:
Code Block | ||
---|---|---|
| ||
<sequence name="auth_failure_handler">
<property name="error_message_type" value="application/xml"/>
<sequence key="build"/>
</sequence> |
If you change application/xml
to something like applicatoin/json
, the error response will be sent in JSON format.
Given below are some error codes and their meanings.
...