AuthException constructor

AuthException({
  1. required String userMessage,
  2. String? devMessage,
  3. String? errorCode,
  4. String? provider,
  5. Object? cause,
  6. StackTrace? stack,
  7. Map<String, dynamic> metadata = const {},
  8. Severity severity = Severity.error,
  9. bool isReportable = true,
})

Creates an auth exception with optional vendor-specific metadata.

Implementation

AuthException({
  required super.userMessage,
  String? devMessage,
  this.errorCode,
  this.provider,
  super.cause,
  super.stack,
  Map<String, dynamic> metadata = const {},
  super.severity,
  super.isReportable,
}) : super(
        devMessage: devMessage ?? userMessage,
        metadata: {
          if (errorCode != null) 'errorCode': errorCode,
          if (provider != null) 'provider': provider,
          ...metadata,
        },
      );