@ultimat3/http 19.3.1 → 19.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -422,6 +422,12 @@ Owned request lifecycle over `Bun.serve`. Tier 2.
422
422
  `APP_ERROR_STATUS` is process-global runtime state filled by the app's own imports, while both
423
423
  named surfaces are build artefacts derived from source, so in a CLI process it answers `{}`.
424
424
  Wiring one means deriving it from source, not re-exporting the map.
425
+ - **A handler's own `Response.status` is never rewritten.** `error-map.ts` answers the status of a
426
+ THROW; a status a handler chose — `html(page, { status: 404 })`, which is what a page route's
427
+ `withStatus(404, data)` in `@ultimat3/render` becomes — passes through every stage as written,
428
+ body included, in dev and in production. `pipeline-handler-status.test.ts` pins it, because the
429
+ render seam is only true while this is: ai-maxxing's `/fleet/nope` answered 200 for as long as
430
+ the only way to a 404 was the error page, outside the app's shell.
425
431
  - **The context carries the inbound headers, never the `Request`.** `ctx.requestHeaders` is set
426
432
  once at construction; `useRequestHeader` / `useRequestCookie` are what app code reads, and
427
433
  `UltimateRequest.cookie()` is what `hooks.authenticate` reads. A `Request` on the context is a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/http",
3
- "version": "19.3.1",
3
+ "version": "19.3.2",
4
4
  "description": "Owned request lifecycle over Bun.serve: router, ordered pipeline, problem+json errors",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,9 +31,9 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@ultimat3/core": "19.3.1",
35
- "@ultimat3/i18n": "19.3.1",
36
- "@ultimat3/schema": "19.3.1",
37
- "@ultimat3/time": "19.3.1"
34
+ "@ultimat3/core": "19.3.2",
35
+ "@ultimat3/i18n": "19.3.2",
36
+ "@ultimat3/schema": "19.3.2",
37
+ "@ultimat3/time": "19.3.2"
38
38
  }
39
39
  }
package/src/error-map.ts CHANGED
@@ -347,6 +347,10 @@ export const ERROR_STATUS = {
347
347
  // document that said "the details are in this process's logs" about an error whose whole
348
348
  // value is the sentence naming the prop and its bytes. Measured on ai-maxxing, 2026-09-05.
349
349
  X_ISLAND_PROPS_INVALID: 500,
350
+ // A loader answered `withStatus` with a 3xx, or a status outside 200–599. Raised INSIDE the
351
+ // request that ran the loader, so it needs a row for the same reason the line above does: an
352
+ // unclassified 500 blanks the sentence naming the status and the `redirect()` to use instead.
353
+ X_ROUTE_STATUS_INVALID: 500,
350
354
  // @ultimat3/mail
351
355
  // The deployment configured no transport. It reaches a caller only through an inline
352
356
  // `send(…, { sync: true })` inside a request; the queued path dead-letters instead. A server-side
@@ -361,6 +365,9 @@ export const ERROR_STATUS = {
361
365
  // MCP host is mounted inside this pipeline — a code that renders 429 on one and 500 on the other
362
366
  // is exactly the split this table exists to prevent.
363
367
  X_MCP_RATE_LIMITED: 429,
368
+ // The second MCP code answered on a request before dispatch, and 413 for the same reason the row
369
+ // above is 429: `transport-http.ts` already answers it with that status by hand.
370
+ X_MCP_BODY_TOO_LARGE: 413,
364
371
  // @ultimat3/core
365
372
  // The caller asked for a format the pipeline cannot produce (`?f=avif`): the request names an
366
373
  // unsupported representation, which is 415 — not a 500, which would blame the server for it.