ProblemDetail

ProblemDetail is the Spring class that represents an HTTP error in the standard RFC 9457 format: type, title, status, detail, and instance fields, with the ability to add properties. It gives API clients a uniform error format. For an unexpected error, the internal detail is not exposed.

Example

ProblemDetail pd = ProblemDetail.forStatusAndDetail(HttpStatus.NOT_FOUND, "Client 12 unknown");

Related concepts

The whole glossary