
上QQ阅读APP看书,第一时间看更新
The fault sequence
The fault sequence is used for exception handling when we haven't configured a custom fault sequence. This sequence logs the error code and the current payload, and then the message is dropped:
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="fault" xmlns="http://ws.apache.org/ns/synapse">
<!-- Log the message at the full log level with
the ERROR_MESSAGE and the ERROR_CODE-->
<log level="full">
<property name="MESSAGE"
value="Executing default 'fault' sequence"/>
<property name="ERROR_CODE"
expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE"
expression="get-property('ERROR_MESSAGE')"/>
</log>
<!-- Drops the messages by default if there is a fault -->
<drop/>
</sequence>