onError method
Implementation
@override
FailureResponse onError(Object error) {
if (error is InvalidResponseRestServiceFailure) {
return HttpFailureResponse(
path: error.path,
statusCode: error.statusCode,
error: error.error,
);
}
if (error is RestServiceFailure) {
return UnknownFailureResponse(error.message);
}
return UnknownFailureResponse(error.toString());
}