Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  API Error

    Posted 2 days ago

    How do I handle API failures from the error within the architect? I want to take action when the return value is 422.


    #Architect

    ------------------------------
    Guilherme de Oliveira Gomes
    ------------------------------


  • 2.  RE: API Error

    Posted 2 days ago

    Hi Guilherme de Oliveira Gomes

    Currently, binding variables to Failure Outputs is only supported in non-call flow types, so in voice Architect flows you can't directly use error details like HTTP 422 for decisioning.
     
    In these cases, any non-200 response will go through the Failure path.
     
    There is an existing idea to improve this behavior:
    https://genesyscloud.ideas.aha.io/ideas/INB-I-1498
    https://genesyscloud.ideas.aha.io/ideas/TEL-I-141
     
    Documentation reference:
    https://help.genesys.cloud/articles/call-data-action/
     
    The best option is to add a middleware (Data Action Function) that converts the status code into a JSON field in the response.
     
    https://help.genesys.cloud/articles/about-the-genesys-cloud-function-data-actions-integration/


    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 3.  RE: API Error

    Posted 2 days ago

    Great idea, Luiz!



    ------------------------------
    Evan Feick
    Sr Technical Account Manager
    ------------------------------