errorToMap method
Implementation
Map<String, dynamic> errorToMap([DioError? error]) => {
'error': (error ?? this.error)?.error,
'type': (error ?? this.error)?.type,
'message': (error ?? this.error)?.message,
'requestOptions':
requestOptionsToMap((error ?? this.error)?.requestOptions),
'response': responseToMap((error ?? this.error)?.response),
'stackTrace': (error ?? this.error)?.stackTrace.toString(),
'errorTime': responseTime?.format(DateTimeDist.yearMillisecond),
};