Class BatchRequestException

All Implemented Interfaces:
Serializable

@Experimental public class BatchRequestException extends RuntimeException
Exception thrown when a batch request operation fails. This exception contains the results of all requests that were attempted, including both successful and failed operations.

The exception provides access to detailed results through getResults(), allowing callers to determine which specific requests failed and why.

Since:
4.0.0
See Also:
  • Constructor Details

    • BatchRequestException

      public BatchRequestException(String message, List<RequestResult<REQ,REP>> allResults)
      Constructs a new BatchRequestException with the specified message and results.
      Type Parameters:
      REQ - The type of the request
      REP - The type of the response
      Parameters:
      message - The error message describing the batch operation failure
      allResults - List of results from all attempted requests in the batch
  • Method Details

    • getResults

      public List<RequestResult<?,?>> getResults()
      Returns the list of results from all requests that were part of the batch operation. Each result contains the original request, the response (if successful), and any error that occurred during processing.
      Returns:
      An unmodifiable list of request results