Response.status() method

Sets the HTTP status code. Called with 429 or 418 before the body is sent.

Signature:

status(code: number): any;

Parameters

Parameter

Type

Description

code

number

the status code to respond with

Returns:

any

Ignored — the middlewares never read it, so returning this for chaining is fine.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.