open-feature / open-feature/spec

Clarify: an error in an `after` hook is abnormal execution and MUST return the default

Open Beginner friendly
#427 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.3k
Forks
58
Avg merge
2d 18h
Merged PRs (30d)
2

Description

4.4.7 only says a before hook error returns the default, but an after hook error should too; it's abnormal execution and it's always been the intent. 4.4.5 already routes after-hook errors to the error hooks (setting reason=ERROR), and the early validation-hook use-case (blog, validator hook) relies on an after hook being able to reject a resolution by erroring/throwing.

Let's make it explicit in 4.4.7 (or a new point) that an after hook error MUST return the default. We should make sure error and finally are unambiguous as well.

Context: https://github.com/open-feature/go-sdk/pull/566

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with specification sections 4.4.5 and 4.4.7, then review the linked validation-hook examples for the intended behavior. Update the relevant normative text so errors from before and after hooks, as well as error and finally handling, are unambiguous; the specification should clearly state the resulting default-return behavior.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.