Uploaded image for project: 'CRISP'
  1. CRISP
  2. CRISP-62

Add response header/body data holder to ExchangeHint

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.1
    • Similar issues:

      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

              • Assignee:
                Unassigned
                Reporter:
                wko Woonsan Ko
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: