Class RequestBodyTooLargeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.vaadin.flow.server.RequestBodyTooLargeException
All Implemented Interfaces:
Serializable

public class RequestBodyTooLargeException extends IOException
Thrown when a client-to-server UIDL/RPC or push request body exceeds the configured maximum size while it is being read.

Extends IOException so that it propagates through the existing request-handling signatures. Request handlers translate this into an HTTP 413 (Request Entity Too Large) response, or, for push messages, into a refresh and disconnect.

Since:
24.10
See Also:
  • Constructor Details

    • RequestBodyTooLargeException

      public RequestBodyTooLargeException(long maxBodySize)
      Creates a new exception for a request body that exceeded the given maximum size.
      Parameters:
      maxBodySize - the configured maximum request body size, in characters
  • Method Details

    • getMaxBodySize

      public long getMaxBodySize()
      Gets the configured maximum request body size, in characters, that was exceeded.
      Returns:
      the maximum request body size in characters