mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
fix(measurements): name the batch validation refusal and the band an entry broke
The validation 422 from `POST /api/measurements/batch` now carries `meta.errorCode: "measurement.batch.invalid"`, beside the existing `too_large` and `source_not_permitted` codes, so a client can file the rows as permanently refused instead of holding its anchor on a guess. A `value_out_of_range` entry now also carries `convertedValue`, the reading after conversion into the stored unit, and `range` (`min`, `max`, `unit`), the band it was checked against. Both appear only on that skip. A fraction sent where a percent was expected is now visible in the response instead of looking like a sensor glitch. Status codes, the envelope and every existing field are unchanged.
This commit is contained in:
1 parent
74dedee645
commit
a7682a9fed
5 files changed
+320
-15
No files matched your search
@@ -198,6 +198,7 @@ export const ERROR_CODE_CATALOGUE: Readonly<Record<string, readonly string[]>> =
|
||||
"managed_profile.not_found",
|
||||
],
|
||||
measurement: [
|
||||
"measurement.batch.invalid",
|
||||
"measurement.batch.source_not_permitted",
|
||||
"measurement.batch.too_large",
|
||||
"measurement.bulk-delete.invalid",
|
||||
|
||||
Reference in new issue
Block a user