Error codesRouter

A page changed its status after streaming began

MARKLESS_ROUTER_RESPONSE_COMMITTEDerrorMarkless raises it while a page runs.

The message

MARKLESS_ROUTER_RESPONSE_COMMITTED: <write> ran after the page's response started streaming to the browser, so its status and headers were already sent. Set http.response before the first byte goes out: in the page body, before any await that outlives the first flush.

Words in angle brackets change from case to case.

Why

The router sends the status and headers with the first bytes of the page. A page that waits on data keeps streaming after that. This write came later and tried to change what was already sent.

Fix

Set http.response.status and http.response.headers in the page body, before anything the page waits on. Writing the same value again is fine.

Where Markless raises it

All error codes