Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Mar 4, 2024
1 parent 7a13bc6 commit 7f1012d
Showing 1 changed file with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
import 'package:celest_core/celest_core.dart';

// TODO(dnys1): Make sealed
final class PasskeyException implements AuthException {
const PasskeyException({
required this.message,
});

@override
final String message;

@override
String toString() => 'PasskeyException: $message';
}

final class PasskeyCancellationException extends PasskeyException {
const PasskeyCancellationException()
: super(message: 'Passkey registration was canceled by the user');
}

final class PasskeyUnknownException extends PasskeyException {
const PasskeyUnknownException([String? message])
: super(
message: message ??
'An unknown error occurred during passkey registration',
);
}

final class PasskeyUnsupportedException extends PasskeyException {
const PasskeyUnsupportedException()
: super(message: 'Passkeys are not supported on this platform');
}

final class PasskeyFailedException extends PasskeyException {
const PasskeyFailedException([String? message])
: super(message: message ?? 'Passkey registration failed');
}
abstract interface class PasskeyException implements AuthException {}

0 comments on commit 7f1012d

Please sign in to comment.