Skip to content
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

Add NewWireError #437

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Add NewWireError #437

merged 1 commit into from
Jan 13, 2023

Conversation

akshayjshah
Copy link
Member

@akshayjshah akshayjshah commented Jan 13, 2023

Currently, only the Connect runtime can create errors that return true
when tested by IsWireError. However, streaming RPCs commonly indicate
partial failure by including an error code and message in their response
message. To propagate these partial failures properly, clients need a
way to construct wire errors. This commit adds NewWireError to satisfy
this use case.

Fixes #420.

Currently, only the Connect runtime can create errors that return true
when tested by `IsWireError`. However, streaming RPCs commonly indicate
partial failure by including an error code and message in their response
message. To propagate these partial failures properly, clients need a
way to construct wire errors. This commit adds `NewWireError` to satisfy
this use case.

Fixes #420.
Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@akshayjshah akshayjshah merged commit bddd2f9 into main Jan 13, 2023
@akshayjshah akshayjshah deleted the ajs/wire branch January 13, 2023 18:47
renovate bot referenced this pull request in open-feature/flagd Jan 27, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/bufbuild/connect-go](https://github.com/bufbuild/connect-go)
| require | minor | `v1.4.1` -> `v1.5.0` |

---

### Release Notes

<details>
<summary>bufbuild/connect-go</summary>

###
[`v1.5.0`](https://github.com/bufbuild/connect-go/releases/tag/v1.5.0)

[Compare
Source](https://github.com/bufbuild/connect-go/compare/v1.4.1...v1.5.0)

#### What's Changed

##### Enhancements

- Add NewWireError for propagating partial stream failures by
[@&#8203;akshayjshah](https://github.com/akshayjshah) in
[https://github.com/bufbuild/connect-go/pull/437](https://github.com/bufbuild/connect-go/pull/437)

##### Bugfixes

- Match Content-Type charset case-insensitively by
[@&#8203;ichizero](https://github.com/ichizero) in
[https://github.com/bufbuild/connect-go/pull/440](https://github.com/bufbuild/connect-go/pull/440)

#### New Contributors

- [@&#8203;ichizero](https://github.com/ichizero) made their first
contribution in
[https://github.com/bufbuild/connect-go/pull/440](https://github.com/bufbuild/connect-go/pull/440)

**Full Changelog**:
bufbuild/connect-go@v1.4.1...v1.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/open-feature/flagd).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTEuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExMS4xIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
akshayjshah added a commit that referenced this pull request Jul 26, 2023
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.

expose an API for constructing a wire error
2 participants