-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
35 deletions.
There are no files selected for viewing
36 changes: 1 addition & 35 deletions
36
packages/celest_core/lib/src/auth/passkeys/passkey_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} |