This commit is contained in:
2026-09-29 14:26:17 +02:00
parent 88a7c2eba0
commit 06fe43bba3
24 changed files with 985 additions and 174 deletions

View File

@@ -0,0 +1,32 @@
/// Erreurs métier pour les appels API 42.
sealed class IntraApiException implements Exception {
const IntraApiException(this.message);
final String message;
@override
String toString() => message;
}
class IntraNotAuthenticatedException extends IntraApiException {
const IntraNotAuthenticatedException()
: super('Connecte-toi d’abord à l’API 42');
}
class IntraUserNotFoundException extends IntraApiException {
const IntraUserNotFoundException()
: super('Aucun utilisateur pour ce login');
}
class IntraNetworkException extends IntraApiException {
const IntraNetworkException()
: super('Connexion impossible. Vérifie le réseau.');
}
class IntraUnauthorizedException extends IntraApiException {
const IntraUnauthorizedException()
: super('Session expirée. Reconnecte-toi à l’API 42');
}
class IntraApiErrorException extends IntraApiException {
const IntraApiErrorException(super.message);
}