@ztimson/utils 0.28.5 → 0.28.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/errors.d.ts +5 -0
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1503,6 +1503,15 @@ class NotAcceptableError extends CustomError {
|
|
|
1503
1503
|
return err.constructor.code == this.code;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
+
class TooManyRequestsError extends CustomError {
|
|
1507
|
+
static code = 429;
|
|
1508
|
+
constructor(message = "Rate Limit Reached") {
|
|
1509
|
+
super(message);
|
|
1510
|
+
}
|
|
1511
|
+
static instanceof(err) {
|
|
1512
|
+
return err.constructor.code == this.code;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1506
1515
|
class InternalServerError extends CustomError {
|
|
1507
1516
|
static code = 500;
|
|
1508
1517
|
constructor(message = "Internal Server Error") {
|
|
@@ -2734,6 +2743,7 @@ export {
|
|
|
2734
2743
|
ServiceUnavailableError,
|
|
2735
2744
|
Table,
|
|
2736
2745
|
TemplateError,
|
|
2746
|
+
TooManyRequestsError,
|
|
2737
2747
|
TypedEmitter,
|
|
2738
2748
|
UnauthorizedError,
|
|
2739
2749
|
addUnique,
|