Rendering

Streaming HTTP status commitment

Once headers have been sent, late errors cannot change the status. A streamed not-found UI may accompany status 200; inspect actual status and indexing metadata. Source: https://nextjs.org/docs/app/api-reference/file-conventions/loading

Formal Syntax & Structure

nextjs syntaxnextjs
Status and headers precede streamed body

Working Example

Example Snippetnextjs
Before headers: choose 404, then send Not found.After headers 200 and SHELL: error occurs; send safe failure marker or terminate.Observed HTTP status stays 200; consumer must check completion.
Next.js Reference