|
| 1 | +--- |
| 2 | +"@object-ui/plugin-list": minor |
| 3 | +"@object-ui/i18n": minor |
| 4 | +--- |
| 5 | + |
| 6 | +fix(list,i18n): a 400 from the server no longer reads as "check your connection" |
| 7 | + |
| 8 | +`classifyLoadError` was written because a 403 rendered the same |
| 9 | +"check your connection and try again" panel as a genuine outage — its own doc |
| 10 | +comment says users "were told to debug their network when the server had |
| 11 | +(correctly) denied them access." It made that distinction for 401 and 403 and |
| 12 | +then sent **everything else**, including 4xx, to the network branch. |
| 13 | + |
| 14 | +A **400** is the server saying it understood the request and will never accept |
| 15 | +it. Retrying resends the identical bad request, so "check your connection and |
| 16 | +try again" is advice that cannot work — the same mistake the function exists to |
| 17 | +prevent, one status code over. |
| 18 | + |
| 19 | +This became reachable from ordinary stored metadata with |
| 20 | +objectstack-ai/objectstack#4121: a `$filter` array that is not a filter AST is |
| 21 | +now rejected at the protocol with `400 INVALID_FILTER`, where it previously |
| 22 | +reached a driver (and, for a lone `['and']`, silently returned every row). A |
| 23 | +view saved with such a filter now answers 400 on every load. |
| 24 | + |
| 25 | +Adds a fourth classification, `rejected`, for `status === 400` and for the |
| 26 | +server's 400-class codes (`INVALID_FILTER`, `UNSUPPORTED_QUERY_PARAM`, |
| 27 | +`INVALID_QUERY`). Its copy points at the filter rather than the network, and |
| 28 | +says who can fix it when the view is saved that way. 403/401 keep priority, so a |
| 29 | +permission denial can never read as a bad request — pinned by a test. |
| 30 | + |
| 31 | +The two new strings are added to **all ten locale packs**, not just `en`: the |
| 32 | +neighbouring panels are translated, and `fallbackLng: 'en'` would have rendered |
| 33 | +this one in English beside them. The full-parity gate |
| 34 | +(`all-locales-key-parity.test.ts`) caught the pack I missed. |
| 35 | + |
| 36 | +Verified: 5 new tests — numeric status, error code without a status, a status |
| 37 | +embedded in the message text, and the 403/401 ordering guard. Reverting the |
| 38 | +branch fails four of them. `plugin-list` + `i18n`: **403 tests across 29 files**, |
| 39 | +green. |
0 commit comments