package com.seer.teach.common.exception;

/**
 * @author Captain
 */
public class RemoteCallException extends RuntimeException {

    // HTTP 状态码
    private final int statusCode;
    // HTTP 原因短语或自定义错误信息
    private final String reason;

    public RemoteCallException(int statusCode, String reason) {
        super("远程调用失败，状态码：" + statusCode + "，原因：" + reason);
        this.statusCode = statusCode;
        this.reason = reason;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public String getReason() {
        return reason;
    }
}
