Class ErrorResponseException

All Implemented Interfaces:
Serializable, ErrorResponse
Direct Known Subclasses:
ResponseStatusException

public class ErrorResponseException extends NestedRuntimeException implements ErrorResponse
RuntimeException that implements ErrorResponse to expose an HTTP status, response headers, and a body formatted as an RFC 9457 ProblemDetail.

The exception can be used as is, or it can be extended as a more specific exception that populates the type or detail fields, or potentially adds other non-standard properties.

Since:
6.0
Author:
Rossen Stoyanchev
See Also: