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="{ &quot;message&quot;: &quot;unsupported media type&quot; }" 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="{ &quot;message&quot;: &quot;not acceptable&quot; }" 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

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -