ABUSResult.error constructor
Creates an error result.
Used when an interaction fails with an error.
Example:
final result = ABUSResult.error(
'Network connection failed',
interactionId: 'fetch_users',
metadata: {'retry_count': 3},
);
Parameters:
error
: Human-readable error messageinteractionId
: Optional ID of the failed interactionmetadata
: Optional additional error metadata
Implementation
factory ABUSResult.error(
String error, {
String? interactionId,
Map<String, dynamic>? metadata,
}) {
return ABUSResult._(
isSuccess: false,
error: error,
timestamp: DateTime.now(),
interactionId: interactionId,
metadata: metadata,
);
}