onCall method
Implementation
@override
FutureOr<Message> onCall(Request request,
[T? exception, StackTrace? stackTrace]) async {
try {
//TODO: Change
var e = await onError(request, exception!, stackTrace!);
if (e is Response) {
if (exception is StyleException) {
e.statusCode = exception.statusCode;
}
return e;
} else {
//
if (e is Future) {
var r = await e;
if (r is Message) {
return r;
} else {
return request.response(r);
}
}
if (e is Message) {
return e;
} else {
return request.response(Body(e));
}
}
} on Exception {
rethrow;
}
}