diff options
author | 2020-12-13 20:59:11 +0200 | |
---|---|---|
committer | 2020-12-13 20:59:11 +0200 | |
commit | 6a849b1ec94a0a8fdde75787c95b7da4bd927405 (patch) | |
tree | 7e99558e1aa4ff35628b8acc365f1cda7f192594 | |
parent | Move form creation to index file (diff) |
Make error message more user friendly
Co-authored-by: Joe Banks <[email protected]>
-rw-r--r-- | backend/routes/forms/index.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/routes/forms/index.py b/backend/routes/forms/index.py index 5cc6837..bb2b299 100644 --- a/backend/routes/forms/index.py +++ b/backend/routes/forms/index.py @@ -43,7 +43,7 @@ class FormsList(Route): if await request.state.db.forms.find_one({"_id": form.id}): return JSONResponse({ - "error": "Form with same ID already exists." + "error": "id_taken" }, status_code=400) await request.state.db.forms.insert_one(form.dict(by_alias=True)) |