package com.kakao.auth.network.response;

import com.bytedance.covode.number.Covode;
import com.kakao.network.exception.ResponseStatusError;
import com.kakao.network.response.CustomErrorConverter;
import com.kakao.network.response.ResponseBody;

public class AuthResponseError extends ResponseStatusError {
    public static final CustomErrorConverter<AuthResponseError> CONVERTER = new CustomErrorConverter<AuthResponseError>() {
        static {
            Covode.recordClassIndex(45849);
        }

        public final AuthResponseError convert(int i, String str) {
            return new AuthResponseError(i, new ResponseBody(str));
        }
    };
    public static final long serialVersionUID = 3702596857996303483L;
    public final String error;
    public final String errorDescription;
    public final ResponseBody errorResponse;
    public final int httpStatusCode;

    public int getErrorCode() {
        return -776;
    }

    public String getError() {
        return this.error;
    }

    public String getErrorMsg() {
        return this.errorDescription;
    }

    public ResponseBody getErrorResponse() {
        return this.errorResponse;
    }

    public int getHttpStatusCode() {
        return this.httpStatusCode;
    }

    static {
        Covode.recordClassIndex(45848);
    }

    public AuthResponseError(int i, ResponseBody responseBody) {
        super(responseBody.toString());
        this.httpStatusCode = i;
        this.errorResponse = responseBody;
        this.error = responseBody.getString("error");
        this.errorDescription = responseBody.optString("error_description", "");
    }
}
