Package growthbook.sdk.java
Class FeatureFetchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
growthbook.sdk.java.FeatureFetchException
- All Implemented Interfaces:
Serializable
This error is thrown by
GBFeaturesRepository
You can call getErrorCode() to get an enum of various error types you can handle.
CONFIGURATION_ERROR:
- an encryptionKey was provided but the endpoint does not support encryption so decryption fails
- no features were found for an unencrypted endpoint
NO_RESPONSE_ERROR:
- there was no response body
UNKNOWN:
- there was an unknown error that occurred when attempting to make the request.- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCreate an exception with error codeFeatureFetchException
(FeatureFetchException.FeatureFetchErrorCode errorCode, String errorMessage) Create an exception with error code and custom message -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FeatureFetchException
public FeatureFetchException(FeatureFetchException.FeatureFetchErrorCode errorCode, String errorMessage) Create an exception with error code and custom message- Parameters:
errorCode
-FeatureFetchException.FeatureFetchErrorCode
errorMessage
- Custom error message string
-
FeatureFetchException
Create an exception with error code- Parameters:
errorCode
-FeatureFetchException.FeatureFetchErrorCode
-