diff --git a/api/src/exceptions/hit-rate-limit.ts b/api/src/exceptions/hit-rate-limit.ts index 6a7a51f897..f0760537b5 100644 --- a/api/src/exceptions/hit-rate-limit.ts +++ b/api/src/exceptions/hit-rate-limit.ts @@ -1,7 +1,12 @@ import { BaseException } from './base'; +type Extensions = { + limit: number; + reset: Date; +} + export class HitRateLimitException extends BaseException { - constructor(message: string) { - super(message, 429, 'REQUESTS_EXCEEDED'); + constructor(message: string, extensions: Extensions) { + super(message, 429, 'REQUESTS_EXCEEDED', extensions); } }