/** * 结构化配置错误。工厂入口(`createRateLimiter`)在 store 缺失 / rules 非法时 * 立即抛出,让少注入或写错规则在装配时即崩,而不是拖到运行某条限流判定。 */ export class RateLimitConfigError extends Error { /** * @param {string} message * @param {{ cause?: unknown }} [opts] */ constructor(message, opts) { super(message, opts) this.name = 'RateLimitConfigError' } }