You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: error resolution flow control without exceptions (#1095)
* Allowing flowcontrol with out exceptions
So far we used exception to handle our flowcontrol, but
Exceptions are costly. In the end we enriched our
evaluation Details with errorCode and errorMessage.
This can be also handled by the providers if desired,
to reduce the execution footprint in errornous cases,
which do not have to be exceptions.
Eg FlagNotFound - it might be the case, but in performance
critical environments, an exception rather than a normal
return, can cause overhead and can be already too costly.
Signed-off-by: Simon Schrottner <[email protected]>
* fix: adding reason, and removing stacktraces from errors
Signed-off-by: Simon Schrottner <[email protected]>
* Update src/main/java/dev/openfeature/sdk/exceptions/TypeMismatchError.java
Co-authored-by: Justin Abrahms <[email protected]>
Signed-off-by: Simon Schrottner <[email protected]>
---------
Signed-off-by: Simon Schrottner <[email protected]>
Co-authored-by: Justin Abrahms <[email protected]>
@Specification(number="1.4.8", text="In cases of abnormal execution, the `evaluation details` structure's `error code` field **MUST** contain an `error code`.")
274
+
@Specification(number="1.4.9", text="In cases of abnormal execution (network failure, unhandled error, etc) the `reason` field in the `evaluation details` SHOULD indicate an error.")
275
+
@Specification(number="1.4.10", text="Methods, functions, or operations on the client MUST NOT throw exceptions, or otherwise abnormally terminate. Flag evaluation calls must always return the `default value` in the event of abnormal execution. Exceptions include functions or methods for the purposes for configuration or setup.")
276
+
@Specification(number="1.4.13", text="In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional details about the nature of the error.")
0 commit comments