Files
workavia-mail-front/lib/main/exceptions/remote/authentication_exception.dart
T

30 lines
856 B
Dart

import 'package:tmail_ui_user/main/exceptions/remote/remote_exception.dart';
class AuthenticationException extends RemoteException {
const AuthenticationException({super.code, super.message});
@override
String get exceptionName => 'AuthenticationException';
}
class BadCredentialsException extends AuthenticationException {
const BadCredentialsException() : super(message: 'Bad credentials');
@override
String get exceptionName => 'BadCredentialsException';
}
class RefreshTokenFailedException extends AuthenticationException {
RefreshTokenFailedException({
int code = 400,
String? message,
}) : super(
code: code,
message: message ??
'Refresh token failed with status $code. Session invalid or revoked.',
);
@override
String get exceptionName => 'RefreshTokenFailedException';
}