Skip to content

fix(github): catch network ReadTimeout - #308

Merged
nobe4 merged 3 commits into
mainfrom
catch-timeout
Oct 13, 2026
Merged

nobe4 merged 3 commits into
mainfrom
catch-timeout

Conversation

@nobe4

@nobe4 nobe4 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Today we got a

ERROR -- : Caught Net::ReadTimeout POSTing to https://api.github.com/graphql: Net::ReadTimeout with #<TCPSocket:(closed)>

This is not worthy of an ERROR; it's safe to just retry.

Turns out we didn't have any rescue for this case, so I've added it.

I've also flattened the file a little bit, having a global rescue list instead of splitting them.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 06:52
Today we got a

    ERROR -- : Caught Net::ReadTimeout POSTing to https://api.github.com/graphql: Net::ReadTimeout with #<TCPSocket:(closed)>

This is not worthy of an ERROR; it's safe to just retry.

Turns out we didn't have any rescue for this case, so I've added it.

I've also flattened the file a little bit, having a global rescue list
instead of splitting them.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The timeout path fails to reset the cached connection, and an existing test retains the obsolete ERROR expectation.

2 open findings
What changed in this PR

Handles GitHub GraphQL read timeouts as retryable warnings and bumps the patch version.

Changes:

  • Adds Net::ReadTimeout handling and coverage.
  • Flattens exception handling.
  • Bumps version to 1.2.6.
File Description
lib/​entitlements/​service/​github.rb Handles read timeouts as retryable responses.
spec/​unit/​entitlements/​service/​github_spec.rb Adds timeout behavior coverage.
lib/​version.rb Bumps the patch version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread spec/unit/entitlements/service/github_spec.rb
Comment thread lib/entitlements/service/github.rb
@nobe4
nobe4 merged commit b8fc255 into main Oct 13, 2026
16 checks passed
@nobe4
nobe4 deleted the catch-timeout branch October 13, 2026 07:21
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.

3 participants