unexpectedResponse method
Implementation
@override
Never unexpectedResponse(http.BaseResponse response, Uint8List body) {
  if (response.statusCode >= 400 && response.statusCode < 500) {
    final resp = json.decode(utf8.decode(body));
    if (resp is Map<String, Object?>) {
      throw MatrixException.fromJson(resp);
    }
  }
  super.unexpectedResponse(response, body);
}