Describe the bug
When a user tries to assign a role that does not exist it returns a 500 generic error
Expected behavior
Should return a 400 series error and a message saying they are entering 1 or more roles that do not exist (yet)
To Reproduce
Enter any role that does not exist in the /roles endpoint
Priority
Medium
Logs/Incident Identifier
{
"message": "Database Error",
"incidentIdentifier": "0a0e2651-cf17-4d19-b478-bc6d59b64fce",
"source": "Unknown",
"details": {}
}
CURL Commands
curl -X 'POST' \
'https://cwms-data-test.cwbi.us/cwms-data/user/myname.id/roles/SAM' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H 'Cache-Control: no-cache, no-store, max-age=0' \
-H 'Pragma: no-cache' \
-d '[
"All Users",
"CCP Mgr",
"CCP Proc",
"CCP Reviewer",
"CWMS DBA Users",
"CWMS PD Users",
"CWMS User Admins",
"CWMS Users",
"Data Acquisition Mgr",
"Data Exchange Mgr",
"RDL Mgr",
"RDL Reviewer",
"SHOW STACK TRACE", // this is not in TEST yet
"TS ID Creator",
"VT Mgr",
"Viewer Users"
]'
CDA Version
2026.09.08-develop
Additional context
Confirmed this 500 is an issue in TEST and DEV ( 2026.09.08-develop )
Describe the bug
When a user tries to assign a role that does not exist it returns a 500 generic error
Expected behavior
Should return a 400 series error and a message saying they are entering 1 or more roles that do not exist (yet)
To Reproduce
Enter any role that does not exist in the /roles endpoint
Priority
Medium
Logs/Incident Identifier
{ "message": "Database Error", "incidentIdentifier": "0a0e2651-cf17-4d19-b478-bc6d59b64fce", "source": "Unknown", "details": {} }CURL Commands
CDA Version
2026.09.08-develop
Additional context
Confirmed this 500 is an issue in TEST and DEV ( 2026.09.08-develop )