Created
February 13, 2014 15:33
-
-
Save javaduke/8977245 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apikit:mapping-exception-strategy name="acme-apiKitGlobalExceptionMapping"> | |
<apikit:mapping statusCode="404"> | |
<apikit:exception value="org.mule.module.apikit.exception.NotFoundException" /> | |
<set-property propertyName="Content-Type" value="application/json" /> | |
<set-payload value="{ "message": "Resource not found" }" /> | |
</apikit:mapping> | |
<apikit:mapping statusCode="405"> | |
<apikit:exception value="org.mule.module.apikit.exception.MethodNotAllowedException" /> | |
<set-property propertyName="Content-Type" value="application/json" /> | |
<set-payload value="{ "message": "Method not allowed" }" /> | |
</apikit:mapping> | |
<apikit:mapping statusCode="415"> | |
<apikit:exception value="org.mule.module.apikit.exception.UnsupportedMediaTypeException" /> | |
<set-property propertyName="Content-Type" value="application/json" /> | |
<set-payload value="{ "message": "Unsupported media type" }" /> | |
</apikit:mapping> | |
<apikit:mapping statusCode="406"> | |
<apikit:exception value="org.mule.module.apikit.exception.NotAcceptableException" /> | |
<set-property propertyName="Content-Type" value="application/json" /> | |
<set-payload value="{ "message": "Not acceptable" }" /> | |
</apikit:mapping> | |
<apikit:mapping statusCode="400"> | |
<apikit:exception value="org.mule.module.apikit.exception.BadRequestException" /> | |
<set-property propertyName="Content-Type" value="application/json" /> | |
<set-payload value="{ "message": "Bad request" }" /> | |
</apikit:mapping> | |
</apikit:mapping-exception-strategy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment