Skip to content

Fail the host on any provider error in provisioning - #77

Merged
czpython merged 1 commit into
mainfrom
claude/hostservice-provider-errors-dfwv4q
Oct 18, 2026
Merged

czpython merged 1 commit into
mainfrom
claude/hostservice-provider-errors-dfwv4q

Conversation

@czpython

Copy link
Copy Markdown
Owner

Requested by Paulo · project thread

Before: HostService.provision caught only ProviderCommandError and ProviderTransportError from create_vm. Cloudflare, Daytona, E2B and Vercel each wrapped create_vm in a try block that turned auth and not-found errors into ProviderCommandError; a provider that missed one gave a 500.

After: provisioning catches ProviderError, so any provider error marks the host error with its real type in last_error (for example ProviderAuthError: ...). The four try blocks are gone.

How: one except ProviderError in provision. The delete path still treats ProviderNotFoundError as done. The Cloudflare 401 test now expects ProviderAuthError, and one HostService test covers an auth error from create_vm. Also lifts function-level imports in test_models.py to the top.

Verified: pytest (845 passed; the 2 test_environment_pam failures also fail on main in this container), ruff check, ruff format --check, pyright.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M34UnuQrWKXnCqmUXDQf58
@czpython czpython self-assigned this Oct 18, 2026
@czpython
czpython merged commit eb68325 into main Oct 18, 2026
6 checks passed
@czpython
czpython deleted the claude/hostservice-provider-errors-dfwv4q branch October 18, 2026 17:05
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.

1 participant