Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.langchain4j.exception.LangChain4jException
dev.langchain4j.exception.HttpException
- All Implemented Interfaces:
Serializable
Represents an HTTP-level error returned by a model provider.
Carries the raw HTTP status code alongside the error message so that
higher-level error mappers (such as ExceptionMapper) can translate
specific codes into more descriptive exceptions (e.g. 429 →
RateLimitException, 401 → AuthenticationException).
This class is typically not thrown directly by user-facing APIs; it is an intermediate representation that the HTTP client layer produces before the exception mapper converts it to a more specific type.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
-
-
Method Details
-
statusCode
public int statusCode()
-