import { ExceptionFilter, ArgumentsHost } from '@nestjs/common'; import { HttpAdapterHost } from '@nestjs/core'; import { RateLimitError } from '../../../shared/errors'; /** * Exception filter for rate-limit errors. * * - `RateLimitExceededError` -> `429 Too Many Requests` (with rate-limit headers). * - `RateLimitScriptError` (raised on store failure under `errorPolicy: * 'fail-closed'`) -> `503 Service Unavailable`. Without this, the store error * is NOT a subclass of `RateLimitExceededError` and would surface as an * uncaught `500` on every request while Redis is unavailable. * * Catches the base `RateLimitError` so both cases are handled; any other * subclass falls back to 503 (a rate-limit subsystem failure, not the caller's * fault). */ export declare class RateLimitExceptionFilter implements ExceptionFilter { private readonly adapterHost; private readonly logger; constructor(adapterHost: HttpAdapterHost); catch(exception: RateLimitError, host: ArgumentsHost): void; } //# sourceMappingURL=rate-limit-exception.filter.d.ts.map