errorMapper property
Transforms raw errors into QoraException before they are stored in Failure states.
Use this to normalise API-specific errors (e.g. DioException,
HttpException) into a consistent shape across your app:
errorMapper: (error, stackTrace) => QoraException(
error is DioException ? error.message ?? 'Network error' : '$error',
originalError: error,
stackTrace: stackTrace,
),
When null (default), errors are stored as-is.
Implementation
final QoraException Function(Object error, StackTrace? stackTrace)?
errorMapper;