类 OpenAIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.agentscope.core.model.exception.OpenAIException
- 所有已实现的接口:
Serializable
- 直接已知子类:
AuthenticationException,BadRequestException,InternalServerException,NotFoundException,PermissionDeniedException,RateLimitException,UnprocessableEntityException
Base exception for all OpenAI API errors.
This is the root exception class for OpenAI-related errors. Specific error conditions are represented by subclasses.
- 另请参阅:
-
构造器概要
构造器构造器说明OpenAIException(String message) OpenAIException(String message, int statusCode, String responseBody) OpenAIException(String message, int statusCode, String errorCode, String responseBody) OpenAIException(String message, String errorCode, String responseBody) OpenAIException(String message, Throwable cause) -
方法概要
修饰符和类型方法说明static OpenAIExceptionFactory method to create appropriate exception subclass based on status code.
-
构造器详细资料
-
OpenAIException
-
OpenAIException
-
OpenAIException
-
OpenAIException
-
OpenAIException
-
-
方法详细资料
-
create
public static OpenAIException create(Integer statusCode, String message, String errorCode, String responseBody) Factory method to create appropriate exception subclass based on status code.- 参数:
statusCode- HTTP status codemessage- Error messageerrorCode- OpenAI error coderesponseBody- Full response body- 返回:
- Appropriate exception subclass
-
getStatusCode
-
getErrorCode
-
getResponseBody
-