ServerException

public final class ServerException extends ApiException

Server exception raised by the GenAI API.

Constructors

Link copied to clipboard
public void ServerException(int code, String status, String message)
Creates a new ServerException 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()