KAuthFailure class sealed

로그인 실패 정보를 담는 sealed class

AuthResult의 실패 상태에서 사용됩니다. 타입으로 에러 종류를 구분할 수 있습니다.

타입 기반 처리 (권장)

switch (failure) {
  case NetworkError():
    showRetryButton();
  case TokenError():
    navigateToLogin();
  case ConfigError():
    showSetupGuide();
  case CancelledError():
    return; // 무시
  case AuthError():
    showError(failure.message);
}

기존 방식도 지원

if (failure.isCancelled) return;
if (failure.canRetry) showRetryButton();
Implementers

Constructors

KAuthFailure.create({String? code, String? message, String? hint})
일반 생성자 (기존 호환)
factory
KAuthFailure.fromCode(String code)
에러 코드로부터 적절한 KAuthFailure 서브타입 생성
factory
KAuthFailure.fromJson(Map<String, dynamic> json)
JSON에서 생성
factory

Properties

canRetry bool
재시도 가능한 에러인지 확인
no setter
code String?
에러 코드
final
displayMessage String
사용자에게 표시할 메시지
no setter
hashCode int
The hash code for this object.
no setteroverride
hint String?
해결 힌트
final
isCancelled bool
사용자가 로그인을 취소했는지 확인
no setter
isConfigError bool
설정 오류인지 확인
no setter
isNetworkError bool
네트워크 오류인지 확인
no setter
isPermanent bool
영구적인 에러인지 확인
no setter
isProviderNotConfigured bool
Provider 설정 오류인지 확인
no setter
isTemporary bool
일시적인 에러인지 확인
no setter
isTokenError bool
토큰 관련 오류인지 확인
no setter
isTokenExpired bool
토큰 만료인지 확인
no setter
message String?
에러 메시지 (한글)
final
requiresReauth bool
재인증이 필요한지 확인
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
severity ErrorSeverity
에러 심각도
no setter
shouldIgnore bool
무시해도 되는 에러인지 확인
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
JSON으로 변환
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override