Skip to content

feat!: errorCode as enum, reason as string #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 29, 2022
Merged

feat!: errorCode as enum, reason as string #244

merged 2 commits into from
Sep 29, 2022

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Sep 28, 2022

  • makes errorCode an enum
  • makes reason a string
  • adds errorMessage to resolution/evaluation details

This PR updates the SDK to be conformant to spec v0.5.0

Closes: #242

- makes errorCode an enum
- makes reason a string
- adds errorMessage to resolution/evaluation details

Signed-off-by: Todd Baert <[email protected]>
Copy link
Contributor

@weyert weyert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@codecov-commenter
Copy link

Codecov Report

Merging #244 (b1dc221) into main (1f6eb21) will increase coverage by 0.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
+ Coverage   99.62%   99.81%   +0.18%     
==========================================
  Files          10       14       +4     
  Lines         539     1099     +560     
  Branches       84       88       +4     
==========================================
+ Hits          537     1097     +560     
  Misses          2        2              
Impacted Files Coverage Δ
src/client.ts 100.00% <100.00%> (ø)
src/errors/flag-not-found-error.ts 100.00% <100.00%> (ø)
src/errors/general-error.ts 100.00% <100.00%> (ø)
src/errors/index.ts 100.00% <100.00%> (ø)
src/errors/invalid-context-error.ts 100.00% <100.00%> (ø)
src/errors/open-feature-error-abstract.ts 100.00% <100.00%> (ø)
src/errors/parse-error.ts 100.00% <100.00%> (ø)
src/errors/targeting-key-missing-error.ts 100.00% <100.00%> (ø)
src/errors/type-mismatch-error.ts 100.00% <100.00%> (ø)
src/index.ts 100.00% <100.00%> (ø)
... and 4 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Todd Baert <[email protected]>
@toddbaert toddbaert requested a review from beeme1mr September 29, 2022 15:55
@toddbaert toddbaert merged commit ce7c4ad into main Sep 29, 2022
@beeme1mr beeme1mr deleted the spec/0.5.0 branch September 29, 2022 17:22
toddbaert pushed a commit that referenced this pull request Oct 3, 2022
🤖 I have created a release *beep* *boop*
---


##
[0.5.0](js-sdk-v0.4.0...js-sdk-v0.5.0)
(2022-10-03)

This release makes some change to `errors` and `reasons`. Errors are now
an enumeration, and reasons are a free-form string. The
`EvaluationDetails` and `ResolutionDetails` structures also now include
an optional `errorMessage` which, in the case of abnormal execution,
corresponds to the `message` property of an underlying error that might
have occurred during flag evaluation.

This release also included **experimental** web support and
**experimental** transaction context propagation.

### ⚠ BREAKING CHANGES

* errorCode as enum, reason as string (#244)

### Features

* add transaction propagation
([#212](#212))
([1d251ff](1d251ff))
* errorCode as enum, reason as string
([#244](#244))
([ce7c4ad](ce7c4ad))
* experimental web support
([#200](#200))
([fd144bb](fd144bb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
lukas-reining pushed a commit that referenced this pull request Jun 29, 2023
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update SDK to be compliant with spec v0.5.0
5 participants