Bug #29
closedService Line field not marked mandatory in UI but required in backend, causing validation failure and raw error exposure
Description
The “Service Line” field is not marked as required in the UI, but the backend enforces it as mandatory, causing form submission to fail. Additionally, a raw backend validation error is exposed to the user instead of a user-friendly message, leading to poor UX and potential information disclosure.
Environment
URL: https://dev.akinderwellness.com/pages/organizations
Module: Organization Management
Environment: Dev
Steps to Reproduce
- Go to
Masters → Organizations → Add Organization - Fill Organization Name(Marked Required)
- Do NOT select "Service Line" (appears optional in UI)
- Click Create Organization
Actual Result
Form submission fails
User sees raw backend error: Organization validation failed: serviceLine: Cast to ObjectId failed for value "" (type string) at path "serviceLine", service_line_type: Path service_line_type is required.
Expected Result
Either:"Service Line" should be clearly marked as required (*)
OR It should truly be optional in backend
User-friendly error message:Please select a Service Line
No internal backend errors should be exposed
Files
Updated by Adhi Narayanan about 1 month ago
- File localhost-3000-pages-organizations.png localhost-3000-pages-organizations.png added
- Status changed from New to Resolved
- % Done changed from 0 to 100