Skip to content

fix(functions): add RateLimitError in Deno.errors namespace#2160

Merged
mandarini merged 1 commit intomasterfrom
nyannyacha-patch-1
Mar 11, 2026
Merged

fix(functions): add RateLimitError in Deno.errors namespace#2160
mandarini merged 1 commit intomasterfrom
nyannyacha-patch-1

Conversation

@nyannyacha
Copy link
Copy Markdown
Contributor

This PR adds a custom error type for rate-limiting introduced in supabase/edge-runtime#670.

@nyannyacha nyannyacha requested review from a team as code owners March 11, 2026 05:28
@github-actions github-actions bot added the functions-js Related to the functions-js library. label Mar 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 03d1bb5c-fa08-4c1c-a78e-c36803da57b2

📥 Commits

Reviewing files that changed from the base of the PR and between 280e453 and 5adbfda.

📒 Files selected for processing (1)
  • packages/core/functions-js/src/edge-runtime.d.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added RateLimitError exception for handling rate-limit scenarios with optional retry-after timing information.

Walkthrough

This change introduces a new RateLimitError class to the Deno.errors namespace in the edge runtime type definitions. The class extends the standard Error and includes a retryAfterMs property of type number | null to indicate when a rate-limited operation can be retried. The constructor accepts an error message and an optional retry delay in milliseconds. This provides a standardized error type for handling HTTP rate-limiting scenarios in edge runtime environments.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 11, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2160

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2160

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2160

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2160

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2160

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2160

commit: ad56c12

@mandarini mandarini merged commit 3f329cc into master Mar 11, 2026
25 checks passed
@mandarini mandarini deleted the nyannyacha-patch-1 branch March 11, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions-js Related to the functions-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants