KAuthError.fromCode constructor

KAuthError.fromCode(
  1. String code, {
  2. Map<String, dynamic>? details,
  3. Object? originalError,
})

에러 코드로부터 KAuthError 생성

Implementation

factory KAuthError.fromCode(
  String code, {
  Map<String, dynamic>? details,
  Object? originalError,
}) {
  final errorInfo = ErrorCodes.getErrorInfo(code);
  return KAuthError(
    code: code,
    message: errorInfo.message,
    hint: errorInfo.hint,
    docs: errorInfo.docs,
    details: details,
    originalError: originalError,
  );
}