Problem:ConvertBsonToGeometry, ConvertBsonToDictionary, ConvertBsonValueToObject are declared but never called. ConvertToDto uses JsonSerializer exclusively. Dead code increases audit surface and confuses readers.
Fix: Remove the unused methods, OR if they're intentionally retained for an upcoming BSON path, leave a clear comment explaining why and add a // TODO issue link.
Acceptance criteria:
Dead methods removed (or documented with intent)
Build still passes
No behavior change
**Severity:** Medium (maintainability)
**File:** `SpikerSoft.Business/Domain/Map/Trails/Queries/GetTrailById/GetTrailByIdQueryHandler.cs` (~63-116)
**Problem:** `ConvertBsonToGeometry`, `ConvertBsonToDictionary`, `ConvertBsonValueToObject` are declared but never called. `ConvertToDto` uses `JsonSerializer` exclusively. Dead code increases audit surface and confuses readers.
**Fix:** Remove the unused methods, OR if they're intentionally retained for an upcoming BSON path, leave a clear comment explaining why and add a `// TODO` issue link.
**Acceptance criteria:**
- [ ] Dead methods removed (or documented with intent)
- [ ] Build still passes
- [ ] No behavior change
Removed the unused ConvertBsonToGeometry, ConvertBsonToDictionary, and ConvertBsonValueToObject methods plus the using MongoDB.Bson; import. Also simplified the handler -- the outer try/catch that re-wrapped every exception (including the not-found case) in a generic Exception was removed; the typed TrailNotFoundException (issue #57) now propagates cleanly.
**Resolved.**
Removed the unused `ConvertBsonToGeometry`, `ConvertBsonToDictionary`, and `ConvertBsonValueToObject` methods plus the `using MongoDB.Bson;` import. Also simplified the handler -- the outer `try/catch` that re-wrapped every exception (including the not-found case) in a generic `Exception` was removed; the typed `TrailNotFoundException` (issue #57) now propagates cleanly.
File: `SpikerSoft.Business/Domain/Map/Trails/Queries/GetTrailById/GetTrailByIdQueryHandler.cs`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Medium (maintainability)
File:
SpikerSoft.Business/Domain/Map/Trails/Queries/GetTrailById/GetTrailByIdQueryHandler.cs(~63-116)Problem:
ConvertBsonToGeometry,ConvertBsonToDictionary,ConvertBsonValueToObjectare declared but never called.ConvertToDtousesJsonSerializerexclusively. Dead code increases audit surface and confuses readers.Fix: Remove the unused methods, OR if they're intentionally retained for an upcoming BSON path, leave a clear comment explaining why and add a
// TODOissue link.Acceptance criteria:
Resolved.
Removed the unused
ConvertBsonToGeometry,ConvertBsonToDictionary, andConvertBsonValueToObjectmethods plus theusing MongoDB.Bson;import. Also simplified the handler -- the outertry/catchthat re-wrapped every exception (including the not-found case) in a genericExceptionwas removed; the typedTrailNotFoundException(issue #57) now propagates cleanly.File:
SpikerSoft.Business/Domain/Map/Trails/Queries/GetTrailById/GetTrailByIdQueryHandler.cs.