@Component public class ResponseErrorMapper extends Object
| Constructor and Description |
|---|
ResponseErrorMapper() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity |
generateErrorResponse(MessageError error)
Generates
ResponseEntity with given error in the body |
org.springframework.http.ResponseEntity |
generateErrorResponse(MessageError error,
ResponseHeaders responseHeaders)
Generates
ResponseEntity with given error in the body and response headers |
public org.springframework.http.ResponseEntity generateErrorResponse(MessageError error)
ResponseEntity with given error in the bodyerror - error to be returned in the bodypublic org.springframework.http.ResponseEntity generateErrorResponse(MessageError error, ResponseHeaders responseHeaders)
ResponseEntity with given error in the body and response headerserror - error to be returned in the bodyresponseHeaders - headers to be returned in the responseCopyright © 2020. All rights reserved.