parseErrorResponse
parseErrorResponse(
response,body?):Error
Defined in: src/http-api/utils.ts:81
Attempt to turn an HTTP error response into a Javascript Error.
If it is a JSON response, we will parse it into a DigitalWorldError. Otherwise we return a generic Error.
Parameters
Section titled “Parameters”response
Section titled “response”XMLHttpRequest | Response
response object
string
raw body of the response
Returns
Section titled “Returns”Error