I am able to capture 503 error from the backend server, if that is in the status code. However, when there’s an SSL handshake failure I can't catch it with the fault rule looking for
response.status.code == 503
I see the following error when there is a SSL handshake failure:
{"Envelope":{"encodingStyle":"http:\/\/schemas.xmlsoap.org\/soap\/encoding\/","Body":{"Fault":{"faultcode":"soap:Server","faultstring":"The Service is temporarily unavailable","faultactor":{},"detail":{"source":{"errorcode":"messaging.adaptors.http.flow.ServiceUnavailable"}}}}}}
Solved! Go to Solution.
Using message.status.code, I am able to capture 503 errors irrespective of whether it comes from the backend server or due to handshake failure:
message.status.code == 503
This seems to be because message.status.code is READ only and hence once it is set, it retains the same value. However, response.status.code is READ/WRITE, which means on the response path it may be overwritten with some other value, which seems to make it empty.