onError method
Method onError signature
Implementation
@override
Future onError(HasuraError error, HasuraConnect connect) async {
try {
final metric = _mapMetric[error.request.query.hashCode];
metric?.httpResponseCode = 500;
await metric?.stop();
_mapMetric.remove(error.request.query.hashCode);
} catch (e, stackTrace) {
debugPrintStack(
label: e.toString(),
stackTrace: stackTrace,
);
}
return super.onError(error, connect);
}