Viswanathan_Cinnaiah | 2022-10-20 17:28:43 UTC | #1
Dear Genesys enthusiast!
Can you guide how to create an action handing responses with 400 code. Fyi..We need to retrieve “error message” for reporting.
So, We need to create an Genesys Action to call an API which provides the two following responses.
- Successful response: Status code: 200.
{ "transaction": { "id": "227bcbc7-7916-4d07-b990-6d2df6530026", "requestTimeStamp": "2022-10-11T14:07:05.765Z", "responseTimeStamp": "2022-10-11T14:07:06.658Z", "duration": 895 }, "identifier": { "organization": "XXXXX", "identity": { "patientId": XXXXX, "organizationPatientId": "XXXX", "memberId": "XXXX", "personCode": "00", "accountId": null } }, "paymentCards": [ { "key": 10351986, "type": "MASTER CARD", "tokenKey": "XXXX" } ] }
- Failed response: Code: 400
{ "transaction": { "id": "cdb189b9-d74c-4267-b64d-e16200fcc66b", "requestTimeStamp": "2022-10-11T14:39:51.224Z", "responseTimeStamp": "2022-10-11T14:39:51.497Z", "duration": 280 }, "errors": [ { "code": "CARD0004", "message": "Card Type Invalid" } ] }
Thank you for your time and effort on this query.
Jason_Mathison | 2022-10-20 20:59:02 UTC | #2
This is very similar to another post I just responded to. https://developer.genesys.cloud/forum/t/how-to-parse-the-output-of-a-failed-rest-call-in-data-actions/16770/3
Another thing you can do is submit an idea to https://genesyscloud.ideas.aha.io/ideas While this will not immediately resolve your issue, it will let product management know about this issue.
--Jason
system | 2022-11-20 20:59:06 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 16768