title: Spring boot Rest responding with empty body for exceptions other than the ones overridden in my @ControllerAdvice
body: <p>I have a @ControllerAdvice extending ResponseEntityExceptionHandler as an attempt for me to control standard response for any exception raised with in the API call workflow. </p>
  
  <p>Without the Controller advice. I get HTML based generic response generated by spring with correct response headers. But when I add my @ControllerAdvice, Spring doesn't response with generic error body. The body is empty with correct response headers </p>
  
  <pre><code>@Override
  protected ResponseEntity&lt;Object&gt; handleMissingServletRequestParameter(MissingServletRequestParameterException ex,
          HttpHeaders headers, HttpStatus status, WebRequest request) {
  
          String erroMessage = "Required Parameter: '"+ex.getParameterName()+"' was not available in the request.";
          TrsApiError apiError = new ApiError(HttpStatus.BAD_REQUEST, erroMessage, ex, ApiErrorCode.INVALID_REQUEST);
          return buildResponseEntity(apiError);
  }
  </code></pre>
  
  <p>So, now in case of a required parameter missing in the request, the flow beautifully trigger my overridden implementation and responds with JSON payload describing the error. But, in case of any other exception like HttpMediaTypeNotAcceptableException, spring is responding with empty body. </p>
  
  <p>Before I added my advice, spring was responding with generic error response. I am new to spring boot ecosystem. Need help in understanding if this is an expected behavior of if there is a better approach of achieving centralized error handling.</p>