Preserve remote error details and expose typed client failures #1260
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 319 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1260"
general
weight: 0.35
samuelcolvin
Summary
Remote failures can hide the server's reason or bypass
MontyError. Preserve the reason and expose catchable errors in Python and JavaScript.MontyConnectErrorwith status details andMontyConfigurationErrorfor malformed metadata or incompatible pool settings.Retry-Afterdelay-seconds and HTTP dates, capped at one hour. Expose the suggested delay and aretryableflag for temporary refusals, without automatic retries.request_timeoutin connection timeouts, and explain URL and TLS fixes.RuntimeError:prefix from JavaScript host errors. Store policy reasons inremoteCause, notError.cause.Customer-visible change
For example, a synthetic server can now produce:
Connection failures are catchable with
MontyError. A disconnect still does not establish whether the request ran and must not be replayed automatically.The sleep cap is documented, not changed. Capped sleeps still return normally without a warning unless the capped delay would exceed the cumulative sleep limit. The docs explain how the sleep policy differs from the request timeout and how to configure longer waits.
Tests
<a href="https://cloud.murmur.dev/github_app/pydantic/task/github/110818415/w/platform/github/35119617/sandbox-err-monty-client"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.murmur.dev/badge/created-via-murmur-dark-v3.svg"><source media="(prefers-color-scheme: light)" srcset="https://static.murmur.dev/badge/created-via-murmur-light-v3.svg"><img alt="Created via murmur — open this agent's dashboard" src="https://static.murmur.dev/badge/created-via-murmur-light-v3.svg" width="155" height="28"></picture></a>