Skip to content

better tunnel error reporting#428

Merged
kcoopermiller merged 26 commits into
mainfrom
feature/tunnel-errors
Mar 20, 2026
Merged

better tunnel error reporting#428
kcoopermiller merged 26 commits into
mainfrom
feature/tunnel-errors

Conversation

@kcoopermiller

@kcoopermiller kcoopermiller commented Mar 11, 2026

Copy link
Copy Markdown
Member

Note

Medium Risk
Touches tunnel startup/monitoring and HTTP error mapping, so regressions could impact tunnel reliability or change the surfaced error types/messages for consumers.

Overview
Improves tunnel diagnostics across the SDK and CLI by adding structured errors and surfacing richer failure details from the underlying frpc process.

The SDK now introduces TunnelLimitReachedError, enriches TunnelConnectionError with an optional tunnel_id, parses frpc logs to produce clearer connection failures, and preserves recent frpc output for post-exit inspection. The API client also maps certain 400 responses to quota errors, handles additional timeout types, and includes a status field on TunnelInfo returned by get_tunnel/list_tunnels.

The CLI now monitors tunnel process health after startup, prints tailored messages for connection/timeout/quota failures, and displays tunnel status in list and status commands.

Written by Cursor Bugbot for commit deb0c8b. This will update automatically on new commits. Configure here.

@kcoopermiller kcoopermiller marked this pull request as ready for review March 11, 2026 19:29

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fc954506c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime-tunnel/src/prime_tunnel/tunnel.py Outdated
Comment thread packages/prime-tunnel/src/prime_tunnel/tunnel.py Outdated
Comment thread packages/prime/src/prime_cli/commands/tunnel.py Outdated
Comment thread packages/prime-tunnel/src/prime_tunnel/core/client.py
Comment thread packages/prime/src/prime_cli/commands/tunnel.py Outdated
Comment thread packages/prime-tunnel/src/prime_tunnel/tunnel.py Outdated
Comment thread packages/prime-tunnel/src/prime_tunnel/tunnel.py Outdated

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread packages/prime-tunnel/src/prime_tunnel/tunnel.py Outdated
@kcoopermiller kcoopermiller merged commit 83390dd into main Mar 20, 2026
12 checks passed
@kcoopermiller kcoopermiller deleted the feature/tunnel-errors branch March 20, 2026 17:42
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