-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I'm using the SDK in a cloudflare worker with nodejs_compat enabled. When I call an API via client it fails to send the request with the error:
ApiError: Illegal invocation: function called with incorrect `this` reference. See https://developers.cloudflare.com/workers/observability/errors/#illegal-invocation-errors for details.
The error originates here:
xdk-typescript/src/http-client.ts
Line 64 in f6cafdb
| this.fetch = globalThis.fetch; |
Binding the fetch to globalThis fixes it:
this.fetch = globalThis.fetch.bind(globalThis);Metadata
Metadata
Assignees
Labels
No labels