unexpectedResponse method
Never
unexpectedResponse(
- BaseResponse response,
- Uint8List body
)
override
Implementation
@override
Never unexpectedResponse(http.BaseResponse response, Uint8List body) {
MatrixException? matrixException;
try {
matrixException =
MatrixException.fromJson(json.decode(utf8.decode(body)));
} catch (_) {} // Is not a MatrixException!
if (matrixException != null && matrixException.raw.containsKey('errcode')) {
throw matrixException;
}
super.unexpectedResponse(response, body);
}