Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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/default/sequences/_auth_failure_handler.xml file. Given below is the default configuration:

Code Block
languagexml
<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.

...