API Connect

 View Only
  • 1.  Custom Error Messages

    Posted Wed February 21, 2024 06:33 PM

    HI, 

    We are working on the base edition of the API Connect in Saas.

    Given that GatewayScript and XSLT are not available in the base edition of API Connect in SaaS, what options are available to create custom error messages?

    Thanks,

    Paul



    ------------------------------
    Paul Dango
    ------------------------------


  • 2.  RE: Custom Error Messages

    Posted Thu February 22, 2024 05:03 AM

    Hi Paul, 

    A couple of possibilities for creating custom error messages in the base plan could be:

    Set Variable to set the content of the error in the `message.body` context variable (see https://www.ibm.com/docs/en/api-connect/saas?topic=reference-api-connect-context-variables for all the context variables. 
    The Message template policy whilst more typically used for mocking backend responses could be used to build a message using the handlebars syntax (see https://www.ibm.com/docs/en/api-connect/saas?topic=policies-message-template)

    Hope this is useful


    Thanks
    Ricky



    ------------------------------
    Ricky Moorhouse
    IBM API Connect Cloud Architect
    ------------------------------



  • 3.  RE: Custom Error Messages

    Posted Thu February 22, 2024 10:37 AM

    Try it after restarting system.



    ------------------------------
    hmzii hassa
    ------------------------------



  • 4.  RE: Custom Error Messages

    Posted Thu February 22, 2024 11:09 AM
    Thank you..