Uploaded image for project: '[Read Only] - CRISP'
  1. [Read Only] - CRISP
  2. CRISP-63

[Forward-port v13] Add response header/body data holder to ExchangeHint

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 13.0.0

    Description

      At the moment, CRISP API doesn't provide a way to read the response headers or body data if the response status code is not in 2xx range.
      This is a shortcoming if a backend REST service requires a client to check response status code, header or body.

      For example, commercetools defines the http errors:

      When error occurs, the backend informs the client of the error with details like the following example:

      {
        "statusCode": 400,
        "message": "First error message",
        "errors": [
         { "code":"SomeErrorCode", "message": "First error message" },
         { "code":"SomeErrorCode", "message": "Second error message" }
        ]
      }
      

      The response header may contains 400, 404, 500, etc.
      And, the response body is structured like the above example: redundant status code in body and detailed message and error info, which are valuable information to client callers.

      Therefore, we need a way to provide CRISP callers with ability to access those response headers and body data somehow.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: