mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
fix(custom-metrics): say "name taken" only for a name clash
The form read every 409 as "a metric with this name already exists". Now that it keeps one idempotency key across taps, a second tap while the first create is still running also answers 409, and the form told the person their name was taken. The create and rename routes send `customMetric.name_taken` with the clash, and the form matches the code.
This commit is contained in:
1 parent
671245c782
commit
706af61cdd
6 files changed
+14
-3
No files matched your search
@@ -140,6 +140,7 @@ export const ERROR_CODE_CATALOGUE: Readonly<Record<string, readonly string[]>> =
|
||||
"coach-prefs.body.invalid_shape",
|
||||
],
|
||||
consent: ["consent.ai.confirmRequired", "consent.ai.required"],
|
||||
customMetric: ["customMetric.name_taken"],
|
||||
cycle: [
|
||||
"cycle.bulk.invalid",
|
||||
"cycle.bulk.too_large",
|
||||
|
||||
Reference in new issue
Block a user