Amanda
Amanda

Reputation: 141

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"
  }
}

Upvotes: 0

Views: 278

Answers (1)

Pubci
Pubci

Reputation: 4001

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

Upvotes: 1

Related Questions