Commit d1284e1
refactor(ogc): pass the network-error host to _run_sync explicitly
`_run_sync` reported a connection failure against `_ogc_base_url.get()` — the
engine's request-builder base (`{base}/collections/{service}/items`).
`wateruse` builds its own NWDC requests and never uses that builder, so it was
wrapping its fan-out in `with _ogc_base_url(WATERUSE_URL)` purely to steer that
error message: borrowing an unrelated ambient and setting it to a `/data`
endpoint that would be nonsensical had the request-builder ever run in scope.
Give `_run_sync` an explicit `error_url` parameter (default `None` → the
scoped `_ogc_base_url`, unchanged for the OGC / NGWMN getters). `wateruse`
passes its endpoint directly and no longer touches the request-builder ambient.
Behavior-identical; surfaced by /simplify (altitude).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sjb14HkwuCydKSKMsaXsgd1 parent 8e3d2b8 commit d1284e1
2 files changed
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
948 | 949 | | |
949 | 950 | | |
950 | 951 | | |
| |||
957 | 958 | | |
958 | 959 | | |
959 | 960 | | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
960 | 966 | | |
961 | 967 | | |
962 | 968 | | |
| |||
970 | 976 | | |
971 | 977 | | |
972 | 978 | | |
973 | | - | |
974 | | - | |
975 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
976 | 988 | | |
977 | 989 | | |
978 | 990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| |||
0 commit comments