Mule APIKit default mapping exception strategy 406 and 415 -
the default mule apikit mapping-exception-strategy contains mappings 406 , 415 this:
<apikit:mapping statuscode="415"> <apikit:exception value="org.mule.module.apikit.exception.unsupportedmediatypeexception" /> <set-property propertyname="content-type" value="application/json" doc:name="content-type : application/json" /> <set-payload value="{ "message": "unsupported media type" }" doc:name="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" doc:name="content-type : application/json" /> <set-payload value="{ "message": "not acceptable" }" doc:name="message : not acceptable" /> </apikit:mapping>
i'm not clear on causes these 2 types of exceptions. can explain?
the idea throw exception types whenever want response statuses produced.
Comments
Post a Comment