package com.kakao.auth.callback;

import com.bytedance.covode.number.Covode;
import com.kakao.auth.AuthService;
import com.kakao.network.ErrorResult;
import com.kakao.util.exception.KakaoException;
import com.kakao.util.exception.KakaoException$ErrorType;

public class AccountErrorResult extends ErrorResult {
    public final AuthService.AgeAuthStatus status;

    static {
        Covode.recordClassIndex(45816);
    }

    public String getErrorMessage() {
        return this.errorMessage;
    }

    public Exception getException() {
        return this.exception;
    }

    public AuthService.AgeAuthStatus getStatus() {
        return this.status;
    }

    public String toString() {
        return "AccountErrorResult{status=" + this.status + ", errorMessage='" + this.errorMessage + '\'' + '}';
    }

    public AccountErrorResult(int i) {
        super((Exception) new KakaoException(KakaoException$ErrorType.UNSPECIFIED_ERROR, "Age Authentication failure"));
        this.status = AuthService.AgeAuthStatus.valueOf(i);
    }

    public AccountErrorResult(int i, Exception exc) {
        super(exc);
        if (exc == null || !(exc instanceof KakaoException) || ((KakaoException) exc).getErrorType() != KakaoException$ErrorType.CANCELED_OPERATION) {
            this.status = AuthService.AgeAuthStatus.valueOf(i);
        } else {
            this.status = AuthService.AgeAuthStatus.CANCELED_OPERATION;
        }
    }
}
