Error customisation for Validate API Specification

Hi All,

I am new to SAG API management platform. I am trying to use “Validate API Specification” policy. When the policy is applied, APIGW generates error in below format:

{
    "Exception": "API Gateway encountered an error. Error Message:  API Specification validation failed. Request headers do not match with API headers. Request Details: Service - XXX, Operation - XXX, Invocation Time:13:29:42, Date:21-Apr-2021,  Client IP - 10.91.177.136, User - Default and Application:null"
}

Is it possible to change this error response.

Thanks,
Kalpana

Hello All,

Could any one please help or share the link for related documentation.

Thanks,
Kalpana

In what way do you want to customise the error ?
You could try using a custom error policy in the response step.
regards,
John.

Thank you John. I would like to send unique error message for each error scenario. Something like below

{
"status": "400-01"
"message: "Query parameter 1 is invalid"
}

{
"status": "400-02"
"message: "Query parameter 2 is missing"
}

Will try exploring custom error policy.

Best regards,
Kalpana