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

fix: more helpful error messages for streaming connection failures #419

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Jun 26, 2024

This commit pulls the stringification logic of SSE errors into the SSE package itself, and refactors the enum into a richer sum type using std::variant.

@cwaldren-ld cwaldren-ld force-pushed the cw/sc-246253/better-sse-error-messages branch from 0930d56 to 2b379f3 Compare June 26, 2024 20:30
@cwaldren-ld cwaldren-ld marked this pull request as ready for review June 26, 2024 20:54
@cwaldren-ld cwaldren-ld requested a review from a team June 26, 2024 20:54
@@ -264,7 +264,7 @@ class FoxyClient : public Client,
return async_backoff(backoff_reason(response.result()));
Copy link
Member

Choose a reason for hiding this comment

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

When does this get logged and what does it look like if it is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's what happens when there's a "recoverable" client error and a retry will occur. The log message looks like:

"Backing off in (N) seconds due to HTTP status 403 (Forbidden)"

Copy link
Member

Choose a reason for hiding this comment

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

Cool. Thank you.

@cwaldren-ld cwaldren-ld merged commit 6bd21ba into main Jul 15, 2024
20 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/sc-246253/better-sse-error-messages branch July 15, 2024 21:00
@github-actions github-actions bot mentioned this pull request Jul 15, 2024
cwaldren-ld pushed a commit that referenced this pull request Jul 15, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-cpp-client: 3.6.2</summary>

##
[3.6.2](launchdarkly-cpp-client-v3.6.1...launchdarkly-cpp-client-v3.6.2)
(2024-07-15)


### Bug Fixes

* more helpful error messages for streaming connection failures
([#419](#419))
([6bd21ba](6bd21ba))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * launchdarkly-cpp-sse-client bumped from 0.5.0 to 0.5.1
</details>

<details><summary>launchdarkly-cpp-server: 3.5.2</summary>

##
[3.5.2](launchdarkly-cpp-server-v3.5.1...launchdarkly-cpp-server-v3.5.2)
(2024-07-15)


### Bug Fixes

* more helpful error messages for streaming connection failures
([#419](#419))
([6bd21ba](6bd21ba))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * launchdarkly-cpp-sse-client bumped from 0.5.0 to 0.5.1
</details>

<details><summary>launchdarkly-cpp-server-redis-source: 2.1.10</summary>

##
[2.1.10](launchdarkly-cpp-server-redis-source-v2.1.9...launchdarkly-cpp-server-redis-source-v2.1.10)
(2024-07-15)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * launchdarkly-cpp-server bumped from 3.5.1 to 3.5.2
</details>

<details><summary>launchdarkly-cpp-sse-client: 0.5.1</summary>

##
[0.5.1](launchdarkly-cpp-sse-client-v0.5.0...launchdarkly-cpp-sse-client-v0.5.1)
(2024-07-15)


### Bug Fixes

* more helpful error messages for streaming connection failures
([#419](#419))
([6bd21ba](6bd21ba))
</details>

---
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>
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.

2 participants