Reliability and error handling
Problem Details and error contracts
Return understandable, safe errors.
Understand the concept
Problem Details is a standard error representation. type identifies the problem kind, title is short, status matches HTTP, detail provides a safe occurrence-specific explanation, and instance can identify the occurrence. Extensions can carry validation or correlation fields.
Keep HTTP and body status consistent. Do not expose traces, SQL or secrets. Correlate public identifiers with protected server logs.
Clients should use stable type/code contracts rather than matching English title text. Distinguish actionable validation and access failures within the security boundary. A central exception pipeline can produce consistent errors; this course illustrates the design without changing existing middleware.
Connect frontend handling with backend observability.
Returning a stack trace as public error detail.
One topic. Three levels of depth.
Content-Type: application/problem+jsonProblem representation media type.
This page does not send requests to external servers. Messages are readable HTTP/1.1 illustrations, not HTTP/2 or HTTP/3 wire dumps. example.test is reserved for examples. Run commands and JavaScript only in your own test environment; never publish real tokens or cookies.
Try it yourself first.
Should client logic depend on an exact English title?
Show the solution and explanation
Stable type/code → localised messageNo; separate stable identifiers from localised copy.