Skip to content

Bug report — Rewriting a WebSocket response throws exception due to unsupported status code 101. #3047

Open
@sassanh

Description

@sassanh

If I try to instantiate a response based on another response, with status code 101, returned by a DurableObject, I get this error:
Responses may only be constructed with status codes in the range 200 to 599, inclusive.

This is causing an issue in next-on-pages as reported here

I don't know if it should be addressed here, or next-on-pages should put an exception for this case to directly return the response coming from the DurableObject and return it without re-instantiation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequest for Workers team to add a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions