Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Unable to pull the Error details from the response payload received from Integration API request

    Posted 03-02-2023 06:43
    Edited by Harsha Shenoy 03-14-2023 09:16
    No replies, thread closed.

    In case of any wrong input in the request or issue at the Oauth app/Mulesoft  side, a response payload with error details is sent by Oauthapp/Mulesoft  Action, we want to capture the errors >> message ("errors": [
    {
    "message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service:... [...]".")

    We have the following Failure outputs captured for the data action in architect, but none of them captures the one above mentioned.
    errorCode
    Status
    correlationID
    entityId
    entityName
    userMessage
    userParamsMessage
    userParams.key
    userParams.value
    details.errorCode
    details.fieldName
    details.entityId
    details.entityName


    Following is the sample failure response from oauthapp/Mulesoft  -

    We checked with Mulesoft integration team and found out that they are sending or have access to update and send only the following -

     {

        "errorStatus": "BAD Request",

        "errorDescription": "HTTP POST on resource 'https://api-XXX... failed: bad request (400).",

        "responsePayload": {

            "errorStatus": "BAD Request",

            "errorDescription": "HTTP POST on resource 'https://xxxxx failed: bad request (400).",

            "transactionId": "0009e3e7-dc9a-45fa-a092-004af2cdd4e6",

            "correlationId": "d2325280-ad22-11ed-9fca-02f6253c9acf",

            "suggested-action": "Please check your request."

        },

        "transactionId": "d2325280-ad22-11ed-9fca-02f6253c9acf",

        "correlationId": "d2325280-ad22-11ed-9fca-02f6253c9acf",

        "suggested-action": "Please check your request."

    }

     

     

    in Genesys cloud we see additional structure, following (also underlined the mulesoft response)-

    {

    "message": "The request could not be understood by the server due to malformed syntax.",

    "code": "bad.request",

    "status": 400,

    "messageParams": {},

    "contextId": "2955bc8c-3832-4b5b-90fd-6b555701c5d1",

    "details": [

    {

    "errorCode": "ACTION.REMOTE_ENDPOINT"

    }

    ],

    "errors": [

    {

    "message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: {\n  "errorStatus": "BAD Request",\n  "errorDescription": "HTTP POST on resource 'https://api-XXX' failed: bad request (400).",\n  "responsePayload": {\n    "errorStatus": "BAD Request",\n    "errorDescription": "HTTP POST on resource 'https://xxxxx' failed: bad request (400).",\n    "transactionId": "54f82daa-1abd-4e67-8b2e-c54c0fad0cf5",\n    "correlationId": "ae986530-9cb5-11ed-882e-06d2ff753015",\n    "suggested-action": "Please check your request."\n  },\n  "transactionId": "ae986530-9cb5-11ed-882e-06d2ff753015",\n  "correlationId": "ae986530-9cb5-11ed-882e-06d2ff753015",\n  "suggested-action": "Please check your request."\n} [2955bc8c-3832-4b5b-90fd-6b555701c5d1]",

    "code": "BAD_REQUEST",

    "status": 400,

    "messageParams": {},

    "details": [],

    "errors": []

    }

    ]

     

    We are unable to capture the response from Mulesoft, in Architect data action block, we see the following kvps in failure path of data action block -

    errorCode

    Status

    correlationID

    entityId

    entityName

    userMessage

    userParamsMessage

    userParams.key

    userParams.value

    details.errorCode

    details.fieldName

    details.entityId

    details.entityName

     

    and following is the mapping between the Key and failure response from the above

    errorCode - "code": "BAD_REQUEST"

    Status - "status": 400

    correlationID - BLANK

    entityId - BLANK

    entityName - BLANK

    userMessage - "message": "The request could not be understood by the server due to malformed syntax."

    userParamsMessage - BLANK

    userParams.key - BLANK

    userParams.value - BLANK

    details.errorCode- "errorCode": "ACTION.REMOTE_ENDPOINT"

    details.fieldName - BLANK

    details.entityId - BLANK

    details.entityName - BLANK

     

    How can we retrieve the one which we had underlined above? Is there any way thru which we can modify the contract? I understand Output contract is for success, is there anything for failure too?


    #ArchitectureandDesign
    #Integrations

    ------------------------------
    Harsha Shenoy
    Conn3ct (Connect Managed Services (UK) Limited)
    ------------------------------



  • 2.  RE: Unable to pull the Error details from the response payload received from Integration API request

    Posted 03-11-2023 22:13
    No replies, thread closed.

    This is really something for the developer forum found here:  Genesys Cloud Developer Forum

    If I had to take a guess without looking at the data actions and responses in detail, I am guessing the field Message - is not correct or the wrong type.  It may not like the " - " in the variable name.  



    ------------------------------
    Robert Wakefield-Carl
    TTEC Digital, LLC fka Avtex Solutions, LLC
    Contact Center Innovation Architect
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Unable to pull the Error details from the response payload received from Integration API request

    Posted 03-14-2023 09:16
    No replies, thread closed.

    Thanks for your response, I dont have - in the variable name. I was using it to show the mapping, I guess you are mentioning about this "userMessage -Task.ErrorMessage", its a typo will correct it, it should be "userMessage".



    ------------------------------
    Harsha Shenoy
    Conn3ct (Connect Managed Services (UK) Limited)
    ------------------------------