- Preparing search index...
- The search index is not available
matrix-js-sdk
Function parseErrorResponse
- parseErrorResponse(response: Response | XMLHttpRequest, body?: string): Error
-
Parameters
-
response: Response | XMLHttpRequest
-
Optional
body: string
Returns Error
Attempt to turn an HTTP error response into a Javascript Error.
If it is a JSON response, we will parse it into a MatrixError. Otherwise we return a generic Error.
Returns