Fix 404.tsx build error — statusCode API removed in Qwik City v1.20 #29

Closed
opened 2026-06-09 19:51:20 +00:00 by glow · 1 comment
Owner

Describe the bug
bun run build fails with:

src/routes/404.tsx:16:45 - error TS2339: Property 'statusCode' does not exist on type 'RequestEvent<QwikCityPlatform>'.

16 export const onRequest: RequestHandler = ({ statusCode }) => {
                                               ~~~~~~~~~~

In Qwik City v1.20, RequestEvent uses .status() instead of .statusCode().

Fix
Change the destructured statusCode to ev and call ev.status(404).

Blocks Issue #8 verification (GA4 via Partytown).

**Describe the bug** `bun run build` fails with: ``` src/routes/404.tsx:16:45 - error TS2339: Property 'statusCode' does not exist on type 'RequestEvent<QwikCityPlatform>'. 16 export const onRequest: RequestHandler = ({ statusCode }) => { ~~~~~~~~~~ ``` In Qwik City v1.20, `RequestEvent` uses `.status()` instead of `.statusCode()`. **Fix** Change the destructured `statusCode` to `ev` and call `ev.status(404)`. Blocks Issue #8 verification (GA4 via Partytown).
glow closed this issue 2026-06-09 19:51:34 +00:00
Author
Owner

Fixed in commit 49de7ae.

Changed ({ statusCode }) => statusCode(404) to (ev) => ev.status(404) — the old statusCode property was removed from RequestEvent in Qwik City v1.20. The replacement is .status(statusCode: number): number.

Fixed in commit `49de7ae`. Changed `({ statusCode }) => statusCode(404)` to `(ev) => ev.status(404)` — the old `statusCode` property was removed from `RequestEvent` in Qwik City v1.20. The replacement is `.status(statusCode: number): number`.
Sign in to join this conversation.
No labels
bug
feature
improvement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow/first-home-diy#29
No description provided.