Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rate limit error code in fetch.ts #259

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* Create middleware for sending a JSON-RPC request to the given RPC URL.
*
* @param options - Options

Check warning on line 37 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (16.x)

JSDoc description does not satisfy the regex pattern

Check warning on line 37 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (18.x)

JSDoc description does not satisfy the regex pattern

Check warning on line 37 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (20.x)

JSDoc description does not satisfy the regex pattern
* @param options.btoa - Generates a base64-encoded string from a binary string.
* @param options.fetch - The `fetch` function; expected to be equivalent to `window.fetch`.
* @param options.rpcUrl - The URL to send the request to.
Expand Down Expand Up @@ -107,7 +107,7 @@
case 405:
throw rpcErrors.methodNotFound();

case 418:
case 429:
throw createRatelimitError();

case 503:
Expand Down Expand Up @@ -141,12 +141,12 @@
/**
* Generate `fetch` configuration for sending the given request to an RPC API.
*
* @param options - Options

Check warning on line 144 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (16.x)

JSDoc description does not satisfy the regex pattern

Check warning on line 144 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (18.x)

JSDoc description does not satisfy the regex pattern

Check warning on line 144 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (20.x)

JSDoc description does not satisfy the regex pattern
* @param options.btoa - Generates a base64-encoded string from a binary string.
* @param options.rpcUrl - The URL to send the request to.
* @param options.originHttpHeaderKey - If provider, the origin field for each JSON-RPC request
* will be attached to each outgoing fetch request under this header.
* @param options.req

Check warning on line 149 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (16.x)

Missing JSDoc @param "options.req" description

Check warning on line 149 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (18.x)

Missing JSDoc @param "options.req" description

Check warning on line 149 in src/fetch.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Lint (20.x)

Missing JSDoc @param "options.req" description
* @returns The fetch middleware.
*/
export function createFetchConfigFromReq({
Expand Down
Loading