2 Replies Latest reply on Apr 16, 2018 8:15 AM by bhim mantha

    Format the JSON Response

    Dharani Pothula New Member

      Hi,

       

      I am trying to invoke an API callout and create a record in salesforce. If there is a failure of creation , can I handle this message and display it .


      Example :

      {

          "error": {

              "code": 500,

              "detail": {

                  "reason": "duplicate value found: Test__c duplicates value on record with id: ",

                  "code": "CreateDataException"

              },

              "message": "duplicate value found: Test__c duplicates value on record with id: "

          }

      }

       

      Thank You