ClientException

public final class ClientException extends ApiException

Client exception raised by the GenAI API.

Constructors

Link copied to clipboard
public void ClientException(int code, String status, String message)
Creates a new ClientException with the specified message.

Properties

Link copied to clipboard
Link copied to clipboard
public final String message
Link copied to clipboard

Functions

Link copied to clipboard
public final synchronized void addSuppressed(Throwable p)
Link copied to clipboard
public int code()
Returns the status code from the API response.
Link copied to clipboard
public synchronized Throwable fillInStackTrace()
Link copied to clipboard
public synchronized Throwable getCause()
Link copied to clipboard
Link copied to clipboard
public String getMessage()
Link copied to clipboard
Link copied to clipboard
public final synchronized Array<Throwable> getSuppressed()
Link copied to clipboard
public synchronized Throwable initCause(Throwable p)
Link copied to clipboard
public String message()
Returns the error message from the API response.
Link copied to clipboard
public void printStackTrace()
Link copied to clipboard
Link copied to clipboard
public String status()
Returns the status from the API response.
Link copied to clipboard
@InternalApi()
public static void throwFromErrorNode(ArrayNode errorNode, int code)
Throws an ApiException from a ArrayNode.
Link copied to clipboard
@InternalApi()
public static void throwFromResponse(Response response)
public static void throwFromResponse(CloseableHttpResponse response)
Throws an ApiException from the response if the response is not a OK status.
Link copied to clipboard
public String toString()