onError method
Called when an exception was occurred during the request.
Implementation
@override
void onError(DioException error, ErrorInterceptorHandler handler) {
if (!enabled || !_shouldLog(error.requestOptions, FilterArgs(true, error.response?.data))) {
handler.next(error);
return;
}
final responseTime = _calculateElapsedTime(error.requestOptions);
if (logError) {
_logErrorDetails(error, responseTime);
}
handler.next(error);
}