Overview

I have an application that allows users to upload a JSON file and parses it using Gson. If the file is invalid, Gson may throw a java.io.EOFException.

Starting with Spring Framework 6.2, due to 9252e741e17d2a810bf084235016692779518ecc, Spring assumes this means the client disconnected and swallows the exception, returning a 200 response and breaking client-side error handling.

To work around this, I would need to handle EOFException in every place that can throw it, replacing it with a different exception.

Related Issues

  • 33763