When sending a request to a resource with an invalid range, the server responds with a 500 Internal server error instead of 416 Requested range not satisfiable.

When the ResourceHttpRequestHandler is executed with an invalid range then it will call the HttpServletResponse.sendError(HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE) method: https://github.com/spring-projects/spring-framework/blob/75329e6d9d93180d9edceb81838b0d96a145d665/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java#L578-L581 Further down the processing line this will not result in a ProblemDetail body response, so the writeWithMessageConverters method in AbstractMessageConverterMethodProcessor will throw a HttpMessageNotWritableException from: https://github.com/spring-projects/spring-framework/blob/8b14bf86efd590247b2b6fd4843023ee283768d0/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java#L364-L367 (Where valueType is java.util.LinkedHashMap and contentType is multipart/form-data)