Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.6.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
- is forward ported by
-
CRISP-63 [Forward-port v13] Add response header/body data holder to ExchangeHint
- Closed