Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message should be clear #10603

Open
Tanuj1718 opened this issue Feb 14, 2025 · 4 comments
Open

Error message should be clear #10603

Tanuj1718 opened this issue Feb 14, 2025 · 4 comments
Assignees

Comments

@Tanuj1718
Copy link
Contributor

Describe the bug
Error is not recognisable with the error message.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://care.ohc.network/questionnaire/arterial_blood_gas
  2. Click on Manage, then click on clone questionnaire
  3. Click on clone
  4. See error message

Expected behavior
Error message should be: Slug should be unique

Screenshots

Image
@tellmeY18 tellmeY18 added this to Care Feb 14, 2025
@tellmeY18 tellmeY18 moved this to Triage in Care Feb 14, 2025
@Tanuj1718
Copy link
Contributor Author

Tanuj1718 commented Feb 14, 2025

@rithviknishad It's a minor change, can you assign it to me if valid.

@michael-020
Copy link

HI @Tanuj1718, this is the error message
{
"errors": [
{
"type": "value_error",
"loc": [
"slug"
],
"msg": "Value error, Slug must be unique",
"input": "arterial_blood_gas-copy",
"ctx": {
"error": "Slug must be unique"
},
"url": "https://errors.pydantic.dev/2.9/v/value_error"
},
{
"type": "too_short",
"loc": [
"organizations"
],
"msg": "List should have at least 1 item after validation, not 0",
"input": [],
"ctx": {
"field_type": "List",
"min_length": 1,
"actual_length": 0
},
"url": "https://errors.pydantic.dev/2.9/v/too_short"
}
]
}

It already says Slug must be unique, so I don't get what problem is to be solved here, can you please explain again

@bodhish
Copy link
Member

bodhish commented Feb 14, 2025

Passing it to @amjithtitus09 as he is already working on the editor.

@tellmeY18 tellmeY18 moved this from Triage to In Progress in Care Feb 14, 2025
@Tanuj1718
Copy link
Contributor Author

HI @Tanuj1718, this is the error message { "errors": [ { "type": "value_error", "loc": [ "slug" ], "msg": "Value error, Slug must be unique", "input": "arterial_blood_gas-copy", "ctx": { "error": "Slug must be unique" }, "url": "https://errors.pydantic.dev/2.9/v/value_error" }, { "type": "too_short", "loc": [ "organizations" ], "msg": "List should have at least 1 item after validation, not 0", "input": [], "ctx": { "field_type": "List", "min_length": 1, "actual_length": 0 }, "url": "https://errors.pydantic.dev/2.9/v/too_short" } ] }

It already says Slug must be unique, so I don't get what problem is to be solved here, can you please explain again

yeah error message might be correct, but the error shown in FE is different.😅

Image

@github-actions github-actions bot added needs-triage question Further information is requested labels Feb 14, 2025
@amjithtitus09 amjithtitus09 added work-in-progress and removed question Further information is requested needs-triage labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants