call method
FutureOr<Response>
call({
- required Request request,
- required RequestResponseHandler normalExecutionFlow,
- ExceptionHandler? onExceptionHandler,
Implementation
FutureOr<Response> call({
required Request request,
required RequestResponseHandler normalExecutionFlow,
ExceptionHandler? onExceptionHandler,
}) async {
try {
return await normalExecutionFlow(request);
} on ResponseException catch (exception) {
if (onExceptionHandler != null) {
return onExceptionHandler.handle(exception.runtimeType, exception);
} else {
return this.onExceptionHandler.handle(exception.runtimeType, exception);
}
}
}