package cn.iocoder.yudao.module.system.framework.agent; import org.springframework.http.HttpStatus; import org.springframework.web.server.ResponseStatusException; import java.util.Map; /** 桥接接口的业务异常,携带真实 HTTP 状态、稳定错误码与可展示明细。 */ public class AgentBridgeException extends ResponseStatusException { private final String errorCode; private final boolean retryable; private final Map details; public AgentBridgeException(HttpStatus status, String errorCode, String message) { this(status, errorCode, message, false, null); } public AgentBridgeException(HttpStatus status, String errorCode, String message, boolean retryable, Map details) { super(status, message); this.errorCode = errorCode; this.retryable = retryable; this.details = details; } public String getErrorCode() { return errorCode; } public boolean isRetryable() { return retryable; } public Map getDetails() { return details; } }