bcgov / bcgov/SIMS

BUG: Supporting-user application lookup failure is logged as unhandled

Open
#6,576 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
29
Forks
15
Avg merge
1d 14h
Merged PRs (30d)
38

Description

**Describe the Bug**

A supporting-user application lookup that cannot find a matching student application returns 422 and is emitted as an unhandled exception.

**Expected Behaviour**

The application-not-found validation is handled as an expected client response with appropriate user feedback and without a misleading unhandled-exception error log.

**Actual Behaviour**

The request fails with `UnprocessableEntityException` and `AppAllExceptionsFilter` records it as unhandled.

**Log**

```text
[Nest] 18 - 09/04/2026, 5:27:36 AM LOG [AccessLoggerMiddleware] Request - POST /api/supporting-users/supporting-user/application From [redacted] | User GUID: [redacted] | User Agent: Edge 152 on Windows
[Nest] 18 - 09/04/2026, 5:27:36 AM ERROR [AppAllExceptionsFilter] Unhandled exception, request path: /api/supporting-users/supporting-user/application
{
"stack": "UnprocessableEntityException: Not able to find a Student Application with the provided data.\n at SupportingUserSupportingUsersController.getApplicationDetails (webpack://studentaid-backend/apps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts:91:13)",
"response": { "message": "Not able to find a Student Application with the provided data." },
"status": 422,
"message": "Not able to find a Student Application with the provided data.",
"name": "UnprocessableEntityException"
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at SupportingUserSupportingUsersController.getApplicationDetails in apps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts, then inspect how AppAllExceptionsFilter handles the UnprocessableEntityException. Reproduce the POST /api/supporting-users/supporting-user/application lookup failure and verify that the 422 response gives appropriate feedback without an unhandled-exception error log.

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
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.