IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Error customisation for Validate API Specification

    Posted 04/21/21 09:58 AM

    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


    #API-Portal
    #webMethods
    #API-Gateway
    #API-Management


  • 2.  RE: Error customisation for Validate API Specification

    Posted 04/23/21 01:33 AM

    Hello All,

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

    Thanks,
    Kalpana


    #API-Gateway
    #webMethods
    #API-Portal
    #API-Management


  • 3.  RE: Error customisation for Validate API Specification

    Posted 04/23/21 01:58 AM

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


    #API-Gateway
    #API-Portal
    #API-Management
    #webMethods


  • 4.  RE: Error customisation for Validate API Specification

    Posted 04/26/21 08:17 AM

    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


    #API-Management
    #webMethods
    #API-Portal
    #API-Gateway