How can i retrieve the payload from error message
Summary:
I am getting an below error message while hitting an third party API in integration.
I need to get the status and message value from this error message and update it into DB.
"STATUS":"F","MESSAGE":"Duplicate Refrence
I have tried substring before and substring after but nothing works for me.
any help is appreciated
Content (please ensure you mask any confidential information):
CloudInvocationException [ Fault Details :<ns0:APIInvocationError xmlns:ns0="http://xmlns.oracle.com/cloud/generic/rest/fault/REST/Create_sales_Order">ns0:type/Errorns0:title/Errorns0:detail/Errorns0:errorCode/Errorns0:errorDetailsErrorns0:typeErrorhttp://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1</ns0:type>ns0:titleErrorBad Request</ns0:title>ns0:errorCodeError400</ns0:errorCode>ns0:errorPathError<![CDATA[InboundJaxrsResponse{context=ClientResponse{method=POST, uri=https://cpi-test-alseer-weee7ggf.it-cpi018-rt.cfapps.eu10-003.hana.ondemand.com/http/val, status=400, reason=Bad Request}}]]></ns0:errorPath>ns0:instanceError<![CDATA[{"HEADER_DETAIL":{"PUR_ORD_REF_NO":"251014900728","CREDENTIAL_FROM":"ALINEA","CREDENTIAL_TO":"ALSEERGROUP","PARTNER_CODE":"0058000001","DOC_TYPE":"ORDERS","DOC_TYPE_CODE":"OR","DOCUMENT_DATE":"20250825","COMPANY_CODE":"5800","SALES_ORG":"5800","PARTNER_SOLD_TO_PARTY":"913115","PARTNER_SHIP_TO_PARTY":"914640","DELIVERY_PLANT":"GF01","REQ_DELIVERY_DATE":"20250825","ORDER_DATE":"20250825","ORDER_TIME":"090833","SOLD_TO_PARTY":"0002000522","SHIP_TO_PARTY":"0002000530","PAYER":"0002000522","STATUS":"F","MESSAGE":"Duplicate Refrence Number"},"SUMMARY":{"TOT_LINES":0,"TOT_PO_VAL":"","TOTGROSSWEI":"","ORDER_NO":""}}.A 400 Bad Request Error indicates that the target service is unable (or refuses) to process the request sent by the client (Oracle Integration Cloud), due to an issue that is perceived by the server to be a client problem. Try invoking the target service using cURL. It may also be that one of the intermediaries (proxy, LBR) could be returning this code. ]]></ns0:instance></ns0:errorDetails></ns0:APIInvocationError> ]