Requirement 2.8
In cases of abnormal execution, the provider MUST indicate an error using the idioms of the implementation language, with an associated error code and optional associated error message.
The provider might throw an exception, return an error, or populate the error code object on the returned flag resolution structure to indicate a problem during flag value resolution.
// example throwing an exception with an error code and optional error message.
throw new ProviderError(ErrorCode.INVALID_CONTEXT, "The 'foo' attribute must be a string.");
https://docs.openfeature.dev/docs/specification/sections/providers#requirement-28
Requirement 2.8 In cases of abnormal execution, the provider MUST indicate an error using the idioms of the implementation language, with an associated error code and optional associated error message.
The provider might throw an exception, return an error, or populate the error code object on the returned flag resolution structure to indicate a problem during flag value resolution.
See error code for details.
Reference Provider (JAVA): https://github.com/splitio/split-openfeature-provider-java/blob/main/src/main/java/io/split/openfeature/SplitProvider.java
Conventions Checklist: https://docs.openfeature.dev/docs/reference/concepts/provider/#checklist