onError method

  1. @override
FutureOr<UnifiedError> onError(
  1. UnifiedError error
)
override

Implementation

@override
FutureOr<UnifiedError> onError(UnifiedError error) async {
  if (showLogs) {
    debugPrint('[UnifiedHttpClient] ✕ error: ${error.error}');
    if (error.response != null) {
      debugPrint('[UnifiedHttpClient] error response: ${error.response?.data}');
    }
  }
  return onErrorOverride?.call(error) ?? error;
}