base backend setup

This commit is contained in:
Lee
2024-10-08 16:36:52 +01:00
parent a83c05aa01
commit debe0f13a2
6 changed files with 133 additions and 4 deletions

View File

@ -0,0 +1,11 @@
import { HttpCode } from "../common/http-codes";
export class RateLimitError extends Error {
constructor(
public message: string = 'rate-limited',
public detail: string = '',
public status: number = HttpCode.TOO_MANY_REQUESTS.code
) {
super(message)
}
}