Class ResponseErrorMapper


  • @Component
    public class ResponseErrorMapper
    extends Object
    • Constructor Detail

      • ResponseErrorMapper

        public ResponseErrorMapper()
    • Method Detail

      • generateErrorResponse

        public org.springframework.http.ResponseEntity generateErrorResponse​(de.adorsys.psd2.xs2a.core.error.MessageError error)
        Generates ResponseEntity with given error in the body
        Parameters:
        error - error to be returned in the body
        Returns:
        response entity with appropriate error status and body
      • generateErrorResponse

        public org.springframework.http.ResponseEntity generateErrorResponse​(de.adorsys.psd2.xs2a.core.error.MessageError error,
                                                                             ResponseHeaders responseHeaders)
        Generates ResponseEntity with given error in the body and response headers
        Parameters:
        error - error to be returned in the body
        responseHeaders - headers to be returned in the response
        Returns:
        response entity with appropriate error status, body and headers
      • generateServiceUnavailableErrorResponse

        public org.springframework.http.ResponseEntity generateServiceUnavailableErrorResponse​(String error)