Class GenericErrorHandler
java.lang.Object
nl._42.restsecure.autoconfigure.errorhandling.GenericErrorHandler
REST errorhandler that sets given http status and writes given errorCode as custom property in the RFC-7078 json object to the http response.
Json example: { errorCode: 'server.error'}
-
Constructor Summary
ConstructorDescriptionGenericErrorHandler
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
-
Constructor Details
-
GenericErrorHandler
public GenericErrorHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
respond
public void respond(jakarta.servlet.http.HttpServletResponse response, org.springframework.http.HttpStatus status, String errorCode) throws IOException - Throws:
IOException
-