TECHNOLOGY

Problem Details: stable error types and localized explanations

In this article
THE QUICK TAKE

Human-readable error wording can change without changing the recovery category; a client should use the documented machine contract.

A problem type identifies an error category

Problem Details defines a structured representation for HTTP API errors. The type URI is its primary problem identifier; a title and detail provide human-readable explanations. A client should not infer a stable error category by matching a sentence in the detail field.

This distinction is useful for multilingual AI tooling. The same quota or validation problem may be described in English or Russian while the application needs one documented recovery branch. That branch still depends on the semantics of the declared problem type, not merely its spelling.

Localized text belongs to presentation

Spring’s error-response support includes message resolution for problem fields. It illustrates why text can legitimately vary with application localization or revised wording. Such changes should not require consumers to reverse-engineer the translated sentence.

A proposed client stores a known type-to-action mapping and presents available explanatory text separately. Unknown types fall back to a general error path. They should not be silently mapped to a familiar category because their title happens to resemble an earlier response.

HTTP status remains a separate signal

The status member in a problem body is advisory relative to the actual HTTP response status. Intermediaries can also affect a response. Preserve the transport status and the parsed problem independently when inspecting failures.

A mismatch needs an explicit handling policy rather than choosing whichever value looks more convenient. A successful body parser does not establish that the server’s status, type and intended application semantics are internally consistent.

Framework support requires configuration awareness

Spring exposes ProblemDetail and related handling facilities. ASP.NET Core describes problem-details services, factories and middleware behavior. Their existence does not prove that every error path in an application returns the same representation.

Routing failures, validation errors and an upstream proxy can follow different paths. A proposed compatibility review inspects representative responses from each path and records media type, transport status and required machine fields. It does not treat enabling one helper as evidence of complete response coverage.

Extensions need a documented contract

Problem Details allows extension members. An API may define a stable code or structured validation information, but consumers need that definition before relying on it. The standard envelope alone does not specify every product-specific recovery rule.

Keep sensitive implementation detail out of public explanations and avoid automatically retrieving arbitrary type URIs during routine error handling. The purpose is a readable, localizable error interface whose machine identity survives editorial changes without hiding malformed or unexpected responses.

Primary references

RFC Problem Details.

Spring error responses.

ASP.NET Core API error handling.

Related explanations: Explicit operation idempotency; Request correlation.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles