Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 367b026cea |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.28.5",
|
||||
"version": "0.28.6",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -113,6 +113,18 @@ export class NotAcceptableError extends CustomError {
|
||||
}
|
||||
}
|
||||
|
||||
export class TooManyRequestsError extends CustomError {
|
||||
static code = 429;
|
||||
|
||||
constructor(message: string = 'Rate Limit Reached') {
|
||||
super(message);
|
||||
}
|
||||
|
||||
static instanceof(err: Error) {
|
||||
return (<any>err).constructor.code == this.code;
|
||||
}
|
||||
}
|
||||
|
||||
export class InternalServerError extends CustomError {
|
||||
static code = 500;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user