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

import org.springframework.http.HttpStatus;

/**
 * 前端业务接口鉴权受控异常。ControllerAdvice 负责转换为稳定 HTTP 响应。
 */
public class FrontendAuthorizationException extends RuntimeException {

    private final HttpStatus status;
    private final String errorCode;

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

    public HttpStatus getStatus() {
        return status;
    }

    public String getErrorCode() {
        return errorCode;
    }
}
