Commit eddcffc
fix(waterdata): raise RequestTooLarge for an unchunkable over-budget request (#309)
ChunkPlan's "no chunkable axes" branch returned immediately without sizing the
request, deliberately leaving an over-budget URL for the server to reject. So a
single large CQL-text `filter` with one big `IN (...)` clause (no top-level
`OR`, hence no chunk axis) was shipped verbatim and failed with an opaque HTTP
414 — and not even RequestTooLarge. (The equivalent
monitoring_location_id=[...] chunks fine.)
Size-check the no-axes path: if the single request fits, pass through as
before; if it's over budget and in the chunker's domain (cql-text / GET
multi-value) there's nothing left to split, raise RequestTooLarge with
actionable guidance instead of shipping it.
A cql-json filter is NOT in the chunker's domain — chunking splits only
cql-text — so an over-budget cql-json request is passed through unchanged
regardless of size; the server judges it, not the chunker. This preserves the
existing cql-json passthrough contract (tests/waterdata_filters_test.py::
test_cql_json_filter_is_not_chunked).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent dca49a7 commit eddcffc
2 files changed
Lines changed: 46 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | 874 | | |
880 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
881 | 898 | | |
882 | 899 | | |
883 | 900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 164 | + | |
| 165 | + | |
167 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
168 | 188 | | |
169 | 189 | | |
170 | 190 | | |
| |||
0 commit comments