程序包 cn.taketoday.web

接口 ErrorResponse

所有超级接口:
HttpStatusCodeProvider
所有已知实现类:
AsyncRequestTimeoutException, DateParameterParsingException, ErrorResponseException, HandlerAdapterNotFoundException, HandlerNotFoundException, HttpMediaTypeException, HttpMediaTypeNotAcceptableException, HttpMediaTypeNotSupportedException, HttpRequestMethodNotSupportedException, InfraConfigurationException, InternalServerException, MethodArgumentNotValidException, MethodNotAllowedException, MethodParameterResolvingException, MissingMatrixVariableException, MissingPathVariableException, MissingRequestCookieException, MissingRequestHeaderException, MissingRequestParameterException, MissingRequestPartException, MissingRequestValueException, NotAcceptableStatusException, ParameterConversionException, ParameterResolverNotFoundException, RequestBindingException, ResponseStatusException, ReturnValueHandlerNotFoundException, UnsatisfiedRequestParameterException, UnsupportedMediaTypeStatusException, ViewRenderingException

public interface ErrorResponse extends HttpStatusCodeProvider
Representation of a complete RFC 7807 error response including status, headers, and an RFC 7807 formatted ProblemDetail body. Allows any exception to expose HTTP error response information.

ErrorResponseException is a default implementation of this interface and a convenient base class for other exceptions to use.

An @ExceptionHandler method can use ResponseEntity.of(ProblemDetail) to map an ErrorResponse to a ResponseEntity.

ErrorResponse is supported as a return value from @ExceptionHandler methods that render directly to the response, e.g. by being marked @ResponseBody, or declared in an @RestController or RestControllerAdvice class.

从以下版本开始:
4.0 2022/3/2 13:34
作者:
Rossen Stoyanchev, Harry Yang
另请参阅: