Skip to content

fix(rpc-plugin): failed to execute 'fetch' on browser#27

Merged
kerimovok merged 1 commit into
honestjs:masterfrom
homaily:fix/rpc-plugin-browser-fetch
Mar 30, 2026
Merged

fix(rpc-plugin): failed to execute 'fetch' on browser#27
kerimovok merged 1 commit into
honestjs:masterfrom
homaily:fix/rpc-plugin-browser-fetch

Conversation

@homaily

@homaily homaily commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Hi @kerimovok,

This PR fixes default fetch missing its correct context when the client used on browser.

currently using the client on browser will throw an error Failed to execute 'fetch' on 'Window': Illegal invocation.

Screenshot 2026-03-30 at 1 29 51 PM

It could be fixed on client initialization by passing a wrapper function (example below) but that's not ideal

new ApiClient('http://localhost:3000', {
  fetchFn: (...args) => fetch(...args),
})

@kerimovok

Copy link
Copy Markdown
Member

Thanks for the PR, @homaily!

@kerimovok kerimovok merged commit cb4a9b7 into honestjs:master Mar 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants