0Pricing
Spring Boot 4 Microservices & REST APIs · Lesson

Problem Details (RFC 7807)

Return standardized error responses.

A Standard for API Errors

Every team inventing its own error JSON leads to chaos for API consumers. RFC 7807 defines Problem Details — a standard, machine-readable error format with a media type of application/problem+json.

The Problem Details Fields

The standard defines a small set of fields:

  • type — a URI identifying the problem kind
  • title — short, human-readable summary
  • status — the HTTP status code
  • detail — specifics for this occurrence
  • instance — URI of the specific occurrence

All lessons in this course

  1. Bean Validation with @Valid
  2. Custom Validators
  3. @ControllerAdvice and @ExceptionHandler
  4. Problem Details (RFC 7807)
← Back to Spring Boot 4 Microservices & REST APIs