TM Forum Community

 View Only
  • 1.  How To Extend Error Response Payload With Optional Attribute

    TM Forum Member
    Posted Sep 04, 2024 05:41

    We would like to get your inputs on a requirement to send additional information as part of the error response. We have a synchronous API which internally performs the below API callouts in the mentioned  sequence below.

    1. Get Quote details
    2. Perform Credit Check
    3. Update Credit Check Result into quote
    4. Update Payment Status
    5. Submit Quote to Product Order In OM

    Now, the ask is if any of the steps from 3 to 5 failed, we need to send "what is the reason of failure + what is the credit check result from step 2".

     Below is the existing sample error response defined for step 5 failure.

    {

      "code": "EditQuoteError",

      "reason": "Error in editing quote",

      "message": "Error in editing quote",

      "status": "500"

    }

    • In the above error response, if we have to indicate credit check result from step 2, how can we do it?
    • Are we allowed to extend the error response to add an optional attribute like creditCheckResult as below?
      • Or any other standard approach we have as per TMF OpenAPI guideline?

    {

      "code": "EditQuoteError",

      "reason": "Error in editing quote",

      "message": "Error in editing quote",

      "status": "500",

      "creditCheckResult': "RED"

    }


    #OpenDigitalArchitecture

    ------------------------------
    Pritam Roy
    Principal Solutions Architect
    Tech Mahindra Limited
    ------------------------------


  • 2.  RE: How To Extend Error Response Payload With Optional Attribute

    TM Forum Member
    Posted Sep 05, 2024 09:44

    Please ignore this discussion , it was shifted to OpenAPI community discussion in following link
    https://engage.tmforum.org/discussion/how-to-extend-error-response-payload-with-optional-attribute



    ------------------------------
    Pritam Roy
    Tech Mahindra Limited
    ------------------------------