fix: display error details nicely in work-pool create command
When the API returns an HTTP error with a detail message (e.g., when
reaching the maximum number of work pools), the CLI now displays the
detail message instead of showing a full stack trace.
Fixes #20243
Co-Authored-By: Nate Nowack <nate@prefect.io>
Add httpx.ConnectError to client retry exceptions
When the Prefect server becomes unavailable after initial connection
(e.g., during restart), API calls now retry with exponential backoff
instead of failing immediately. This prevents flow runs from getting
stuck in Pending state when the server goes down, as the worker can
now successfully mark them as crashed once the server recovers.
Key behavior:
- ConnectError is NOT retried on first request (fail fast for wrong URL)
- ConnectError IS retried after a successful connection has been made
Closes #18324
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix: allow cancelled flows to be retried
Remove CANCELLED from FROM_STATES in EnforceCancellingToCancelledTransition.
This rule should only block transitions FROM CANCELLING, not CANCELLED.
The rule name, docstring, and error message all reference "cancelling" states,
but the implementation incorrectly included CANCELLED, preventing retries.
Fixes #20271
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>