dioException method
void
dioException(
- DioException ex,
- dynamic instance
Dio exception
Implementation
void dioException(DioException ex, dynamic instance) {
// ExceptionOutput.details('RESPONSE BODY', ex.response?.data);
/// On error
if (instance is OnError && ex.response?.data != null) {
(instance).onError.call(ex.response!.data);
}
/// Process 422 errors
if (ex.response?.statusCode == 422 && ex.response?.data != null) {
FormErrorsManager(ex.response!.data).handle();
}
}