Response error detector
Last updated
Last updated
[io/http/utils/Response error detector]
Wraps failed HTTP response into an error, including a message. Example A
message
set to "Response failed"
{"status": 200, "headers": {}, "body": "ABC"}@1 received via response
null@1 sent via body
Example B
message
set to "Response failed"
{"status": 400, "headers": {}, "body": {"success": false}}@1 received via response
{"error": "Response failed", "details": {"success": false}}@1 sent via error
Keywords: http, request, response, error, identify, detect
response:
Receives response that might contain an error.
error msg: string
Receives error message to appear in error
.
body:
error: {"error": string, optional "details": any}