Skip to content

204 No Content response causes "fetch failed" #670

@tatut

Description

@tatut

I have a keyboard handler in body

<body _="on keypress fetch `/kbd/${event.key}` with method:'POST'">
 ...

To send keystrokes to backend, but the backend just accepts it without sending anything back (this is a simple game, the actual contents is polled elsewhere).

my console says

_hyperscript.min.js:19 fetch failed: 204 No Content (/kbd/d)

_hyperscript.min.js:19 Error: fetch failed: 204 No Content (/kbd/d)
    at _hyperscript.min.js:19:54868

(version 0.9.91)

The docs say "fetch throws on non-2xx responses (404, 500, etc.)," so I expect this should not throw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions