Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tizmagik/cf-worker-async-proxy-repro
Reproduction of an issue discovered while using new Proxy() within an async call
https://github.com/tizmagik/cf-worker-async-proxy-repro
Last synced: about 1 month ago
JSON representation
Reproduction of an issue discovered while using new Proxy() within an async call
- Host: GitHub
- URL: https://github.com/tizmagik/cf-worker-async-proxy-repro
- Owner: tizmagik
- Created: 2024-08-20T14:42:30.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T14:25:47.000Z (2 months ago)
- Last Synced: 2024-09-14T05:21:58.686Z (2 months ago)
- Language: TypeScript
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CF Worker + Async Proxy Error Reproduction
This repository is a reproduction of an error that occurs when using Cloudflare Workers with an async proxy.
## Error
When using an async proxy in a Cloudflare Worker, the following error is thrown:
```
Error: The script will never generate a response.
at async Object.fetch (file:///Users/jeremygayed/src/repro/node_modules/miniflare/dist/src/workers/core/entry.worker.js:1026:22)
```## Reproduction
To reproduce the error, run the following commands:
```bash
npm install
npm run start
```To toggle the error, switch between using `createAsyncRouter` and `createRouter`.
Just by calling `createAsyncRouter` instead of `createRouter`, the error is shown -- even if you don't use the returned value.