mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 11:30:04 +08:00
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
import { HttpException, HttpStatus } from '@nestjs/common';
|
|
|
|
export class TooManyRequestsException extends HttpException {
|
|
constructor(desc?: string, code: string = 'Too Many Requests') {
|
|
super(
|
|
HttpException.createBody(
|
|
desc ?? code,
|
|
code,
|
|
HttpStatus.TOO_MANY_REQUESTS
|
|
),
|
|
HttpStatus.TOO_MANY_REQUESTS
|
|
);
|
|
}
|
|
}
|