By default application/xml, you can change that in _auth_failure_handler_.xml file under wso2am-1.8.0/repository/deployment/server/synapse-configs/default/sequences
<sequence name="_auth_failure_handler_" xmlns=" http://ws.apache.org/ns/synapse"> <property name="error_message_type" value="application/xml"/> </sequence> -Ajith On Thu, Feb 26, 2015 at 5:45 PM, Prabath Siriwardena <prab...@wso2.com> wrote: > I tried to call an API with an invalid access token - and following in the > the response I get.. Shouldn't I get a JSON response here..? > > curl -H "Authorization: Bearer 227f7e7119361b31f873b1b6b3abfdff" -k -H > "Accept: application/json" https://localhost:8243/mywso2/1.0.0/employee/4 > > <ams:fault > xmlns:ams="http://wso2.org/apimanager/security"><ams:code>900901</ams:code><ams:message>Invalid > Credentials</ams:message><ams:description>Access failure for API: /mywso2, > version: 1.0.0 with key: > 227f7e7119361b31f873b1b6b3abfdff</ams:description></ams:fault> > > > Thanks & Regards, > Prabath > > Twitter : @prabath > LinkedIn : http://www.linkedin.com/in/prabathsiriwardena > > Mobile : +1 650 625 7950 > > http://blog.facilelogin.com > http://blog.api-security.org > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +1-812-360-5335
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev