I am using Anypoint Studio 6.1 and Mule 3.8.1 and want to send a custom message to the user when a 503 error has occurred. I am using the APIKit exception mapping and using java class javax.ws.rs.ServiceUnavailableException as the expected type to listen for but does not appear to capture the error and shows 500 error in most cases when I expected to see 503.
500 error is mapped to java.lang.Exception which is higher in the hierarchy so looked to change to use java class javax.ws.rs.InternalServerErrorException but this has not captured all 500 errors.
How can I fix this so 503 errors are returned successfully?
Thanks