package cn.nianxx.thhotel.platform.identity.service.impl;

import org.springframework.http.HttpStatus;

/**
 * 登录权限模块受控异常。ControllerAdvice 负责转换为稳定 HTTP 响应。
 */
public class AuthException extends RuntimeException {

    private final HttpStatus status;
    private final String errorCode;

    public AuthException(HttpStatus status, String errorCode, String message) {
        super(message);
        this.status = status;
        this.errorCode = errorCode;
    }

    public HttpStatus getStatus() {
        return status;
    }

    public String getErrorCode() {
        return errorCode;
    }
}
