bcgov / bcgov/SIMS

BUG: Supporting-user self-association validation is logged as unhandled

Open
#6,580 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
29
Forks
15
PR merge metrics
No merged PRs in 30d

Description

**Describe the Bug**

A supporting user attempting to provide data for an application associated with the same identity receives 422 and the validation is emitted as an unhandled exception.

**Expected Behaviour**

The self-association validation is handled as an expected client response with appropriate feedback and without a misleading unhandled-exception error log.

**Actual Behaviour**

`getApplicationDetails` throws `UnprocessableEntityException`, which `AppAllExceptionsFilter` records as unhandled.

**Log**

```text
[Nest] 18 - 09/04/2026, 7:22:31 AM LOG [AccessLoggerMiddleware] Request - POST /api/supporting-users/supporting-user/application From [redacted] | User GUID: [redacted] | User Agent: Firefox 154 on macOS
[Nest] 18 - 09/04/2026, 7:22:31 AM ERROR [AppAllExceptionsFilter] Unhandled exception, request path: /api/supporting-users/supporting-user/application
{
"stack": "UnprocessableEntityException: The user searching for applications to provide data must be different from the user associated with the student application.\n at SupportingUserSupportingUsersController.getApplicationDetails (webpack://studentaid-backend/apps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts:104:13)",
"status": 422,
"message": "The user searching for applications to provide data must be different from the user associated with the student application.",
"name": "UnprocessableEntityException"
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in apps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts at SupportingUserSupportingUsersController.getApplicationDetails, then inspect AppAllExceptionsFilter and its handling of UnprocessableEntityException. Reproduce the self-association request and verify the 422 still provides appropriate feedback without being logged as an unhandled exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.