Class RequestTimeoutException

All Implemented Interfaces:
Serializable

public class RequestTimeoutException extends NetworkException
Exception thrown when a request times out. This exception can be thrown in two cases:
  1. When the server returns an HTTP 504 (Gateway Timeout) status code, indicating that the server did not receive a timely response from an upstream server.
  2. When the client experiences a timeout while waiting for the server's response, even if the server has not explicitly returned a 504 status code.
See Also:
  • Constructor Details

    • RequestTimeoutException

      public RequestTimeoutException(int code, String body, Problem problem)
      Constructs a new BadRequestException.
      Parameters:
      code - The HTTP status code of the response
      body - The raw body of the response
      problem - The parsed problem details, may be null if parsing failed
    • RequestTimeoutException

      public RequestTimeoutException(int code, String body)
      Constructs a new BadRequestException.
      Parameters:
      code - The HTTP status code of the response
      body - The raw body of the response
    • RequestTimeoutException

      public RequestTimeoutException(Throwable cause)
      Constructs a new BadRequestException.
      Parameters:
      cause - The exception that caused this error
  • Method Details

    • getProblem

      @Nullable public Problem getProblem()
      The parsed problem details, if available.