You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/service-utils/src/core/rateLimit/index.ts
+8-11Lines changed: 8 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -82,17 +82,14 @@ export async function rateLimit(args: {
82
82
});
83
83
}
84
84
85
-
// Reject requests when they've exceeded 2x the rate limit.
86
-
if(requestCount>2*limitPerWindow){
87
-
return{
88
-
rateLimited: true,
89
-
requestCount,
90
-
rateLimit: limitPerWindow,
91
-
status: 429,
92
-
errorMessage: `You've exceeded your ${serviceScope} rate limit at ${limitPerSecond} reqs/sec. To get higher rate limits, contact us at https://thirdweb.com/contact-us.`,
93
-
errorCode: "RATE_LIMIT_EXCEEDED",
94
-
};
95
-
}
85
+
return{
86
+
rateLimited: true,
87
+
requestCount,
88
+
rateLimit: limitPerWindow,
89
+
status: 429,
90
+
errorMessage: `You've exceeded your ${serviceScope} rate limit at ${limitPerSecond} reqs/sec. To get higher rate limits, contact us at https://thirdweb.com/contact-us.`,
0 commit comments