简体   繁体   中英

Fault sequence issue in WSO2 APIM

I used an error token to call an API, it response an error message as below(already changed to json format).

I hope I can change the fixed payload, which configuration file can I modify in APIM? Thank you.

{
  "fault": {
    "code": 900901,
    "message": "Invalid Credentials",
    "description": "Access failure for API: /test/v1/check, version: v1 status: (900901) - Invalid Credentials. Make sure you have given the correct access token"
  }
}

This cannot be modified from a configuration file. What you can do is engage a sequence and change the error message as described in http://sanjeewamalalgoda.blogspot.com/2015/06/how-to-send-specific-status-code-and.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM