Project

General

Profile

Actions

Bug #29

closed

Service Line field not marked mandatory in UI but required in backend, causing validation failure and raw error exposure

Added by Vivek Kumar about 1 month ago. Updated 29 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
03/20/2026
Due date:
% Done:

100%

Estimated time:
Spent time:

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

  1. Go to Masters → Organizations → Add Organization
  2. Fill Organization Name(Marked Required)
  3. Do NOT select "Service Line" (appears optional in UI)
  4. 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

BUG AKW0018.png (357 KB) BUG AKW0018.png Vivek Kumar, 03/20/2026 12:15 PM
localhost-3000-pages-organizations.png (1.68 MB) localhost-3000-pages-organizations.png Adhi Narayanan, 03/20/2026 12:29 PM
Actions #1

Updated by Adhi Narayanan about 1 month ago

Actions #2

Updated by Vivek Kumar 29 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF