diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index 4467900df..452c98d68 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -127,9 +127,7 @@ private FlagEvaluationDetails evaluateFlag(FlagValueType type, String key details = FlagEvaluationDetails.from(providerEval, key); if (details.getErrorCode() != null) { - Exception e = ExceptionUtils.instantiateErrorByErrorCode(details.getErrorCode(), - details.getErrorMessage()); - hookSupport.errorHooks(type, hookCtx, e, mergedHooks, hints); + throw ExceptionUtils.instantiateErrorByErrorCode(details.getErrorCode(), details.getErrorMessage()); } else { hookSupport.afterHooks(type, hookCtx, details, mergedHooks, hints); }