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

Error thrown when using worktop/cache with WebSocket route #121

Closed
universse opened this issue Dec 9, 2021 · 1 comment
Closed

Error thrown when using worktop/cache with WebSocket route #121

universse opened this issue Dec 9, 2021 · 1 comment
Labels

Comments

@universse
Copy link

Hi, I'm getting an error when using reply from worktop/cache instead of worktop/module. More details from the miniflare issue cloudflare/miniflare#100 (comment).

import { Router } from 'worktop'
import { reply } from 'worktop/cache'
import { listen } from 'worktop/ws'

const API = new Router()

API.add(
  `GET`,
  `/ws`,
  listen((req, ctx, socket) => {
    console.log(`connected`)
  })
)

export default reply(API.run)

Seems like the websocket response should not be cacheable.

@lukeed lukeed added the has fix label Dec 30, 2021
lukeed added a commit that referenced this issue Dec 30, 2021
@lukeed
Copy link
Owner

lukeed commented Dec 30, 2021

Fixed in worktop@0.8.0-next.9

@lukeed lukeed closed this as completed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants