API Connect

API Connect

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.

 View Only
  • 1.  Error handling

    Posted Mon October 23, 2023 05:10 PM

    Hello Team,

    We have REST API are deployed on IBM API Connect v10.0.5.3.

    These REST APIs route the JSON payload to backend (Provider) REST API.

    Consumer send http request ---> IBM API Connect http request---> Provider System

    I am exploring a way how can I translate the Provider system "errorcode" and "description" to a meaningful "errorcode" and "description" for consumer system.

    Can anyone help me out here?

    Thanks,

    Priyabrata



    ------------------------------
    Priyabrata Parida
    ------------------------------


  • 2.  RE: Error handling

    Posted Tue October 24, 2023 04:06 AM

    Hi,

    There is a Throw policy that you can add to your API Gateway Assembly to manage error handling.

    Throw works best with the Switch policy so you can catch specific error codes / messages and filter them into custom codes / messages using Throw.

    https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=execute-throw

    https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=execute-switch



    ------------------------------
    Nick Cawood
    API Connect Consultant
    IBM Hybrid Cloud Integration Expert Labs
    IBM UK Ltd

    https://www.linkedin.com/in/nickcawood/
    ------------------------------



  • 3.  RE: Error handling

    Posted Fri October 27, 2023 10:18 AM

    Thanks Nick!!



    ------------------------------
    Priyabrata Parida
    ------------------------------