Skip to main content
RFC 7807 · RFC 9457 · Problem Details

Problem4J

Consistent API errors for Java that clients can parse and people can understand. An immutable Problem model, JSON mapping and Spring Boot integration that just work.

GET /orders/42
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json

{
  "type": "https://example.org/errors/invalid-request",
  "title": "Invalid Request",
  "status": 400,
  "detail": "bad input for user 123: email",
  "instance": "/orders/42",
  "traceId": "c0ffee42"
}

One Error Contract

Every service answers failures the same way - type, title, status, detail, instance and custom extensions, as defined by RFC 7807 and RFC 9457.

Immutable & Framework-Free

Problem is an immutable value object with a fluent builder. Use it in any Java application, on the server or in API clients, with ready-made Jackson and Gson mapping.

Drop-in for Spring Boot

Auto-configured for WebMVC and WebFlux. Map your exceptions with a ProblemResolver or @ProblemMapping, and get actionable details for validation and framework errors out of the box.