bcgov / bcgov/SIMS

BUG: Unknown courses route generates an unhandled-exception error log

Open Beginner friendly
#6,582 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 request to the unknown route `GET /api/v1/courses?per_page=100` returns 404 and is emitted as an unhandled exception.

**Expected Behaviour**

Unknown routes return a normal 404 response without generating a misleading unhandled-exception error log.

**Actual Behaviour**

NestJS returns `NotFoundException` and `AppAllExceptionsFilter` records the route miss at error level as unhandled.

**Log**

```text
[Nest] 18 - 09/04/2026, 7:18:31 AM LOG [AccessLoggerMiddleware] Request - GET /api/v1/courses?per_page=100 From [redacted] | User GUID: User GUID not found | User Agent: Firefox 155 on Windows
[Nest] 18 - 09/04/2026, 7:18:31 AM ERROR [AppAllExceptionsFilter] Unhandled exception, request path: /api/v1/courses
{
"stack": "NotFoundException: Cannot GET /api/v1/courses?per_page=100\n at callback (/app/node_modules/@nestjs/core/router/routes-resolver.js:77:19)",
"response": { "message": "Cannot GET /api/v1/courses?per_page=100" },
"status": 404,
"message": "Cannot GET /api/v1/courses?per_page=100",
"name": "NotFoundException"
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading AppAllExceptionsFilter and reproducing GET /api/v1/courses?per_page=100 to follow how NestJS NotFoundException responses are logged. Done means the unknown route still returns a normal 404 response without an error-level “Unhandled exception” log.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.