Skip to content

fix(fetchers/session): fallible client build + typed SessionError (#29 #45)#63

Merged
Liohtml merged 1 commit into
masterfrom
claude/fetcher-session-errors
Jun 24, 2026
Merged

fix(fetchers/session): fallible client build + typed SessionError (#29 #45)#63
Liohtml merged 1 commit into
masterfrom
claude/fetcher-session-errors

Conversation

@Liohtml

@Liohtml Liohtml commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

Error-handling hardening for the fetch path (both Medium):

Test plan

  • Updated spiders_session and fetchers_client tests for the Result-returning signatures
  • cargo test, clippy --all-targets -D warnings, fmt --check green
  • CrawlerEngine::new has no in-tree callers, so the signature change is contained

Closes #29
Closes #45


Generated by Claude Code

- #29: Fetcher::new and build_client now return Result<_, FetcherError>
  instead of .expect()-panicking when the reqwest/TLS client fails to build.
  The fallibility propagates through SessionManager::add_session /
  ensure_default and CrawlerEngine::new; the CLI reports the error and exits
  instead of panicking.
- #45: SessionManager::fetch now returns a typed SessionError
  (NotFound / UnsupportedMethod / Network) instead of a flat String, so
  callers can distinguish an unrecoverable config error (wrong session name)
  from a transient network failure. The engine still forwards the message to
  the on_error hook.

Updated session/client tests for the new Result-returning signatures.

Closes #29
Closes #45

https://claude.ai/code/session_012RmdaovmNWZVAim4XxCWwn
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Liohtml, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 23 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 53af5826-8667-4234-9aa6-65ae3f2b67a0

📥 Commits

Reviewing files that changed from the base of the PR and between eb19302 and 097d771.

📒 Files selected for processing (6)
  • src/fetchers/client.rs
  • src/main.rs
  • src/spiders/engine.rs
  • src/spiders/session.rs
  • tests/fetchers_client.rs
  • tests/spiders_session.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fetcher-session-errors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Liohtml Liohtml merged commit df3c600 into master Jun 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants