Errors, uploads, and endpoint patterns
View as MarkdownThese endpoint patterns share the contract boundary but solve different problems. Read only the page required by the operation:
- Expected errors and HTTP mapping covers one typed domain-error family, declared status/code pairs, adapter mapping, and browser parsing.
- Multipart file uploads
covers contract declaration, the handler
filesargument, row-safe target checks, file limits, and multipart exercise. - Non-JSON and raw responses
covers typed text/CSV responses and the narrow cases that require a raw
Response.
The shared contract owns the wire shape. The route adapter owns request parsing and HTTP translation. Domain code owns invariants. Unexpected failures remain on the application’s central error path.