-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Context
In internal/restapi/trips_for_route_handler.go, the buildTripReferences function uses api.Logger.Debug(...) for database query failures at two locations:
- Line ~365:
GetTripsByIDsfailure - Line ~395:
GetRoutesByIDsfailure
fetchedTrips, err := api.GtfsManager.GtfsDB.Queries.GetTripsByIDs(ctx, tripIDsToFetch)
if err != nil {
api.Logger.Debug("failed to fetch trips for references", "error", err)
}Problem
Debug-level logging is effectively silent in production, where the log level is typically Info or higher. If these batch queries fail (due to database timeout, connection issues, etc.), trip and route references will silently disappear from API responses with no indication in production logs.
Proposed Fix
Upgrade both api.Logger.Debug(...) calls to logging.LogError(...) to ensure these failures are visible in production logs.
Related
Identified during review of #667, which addressed similar silent failures in the block-processing loop of the same handler.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels