Skip to content

Surface parse errors instead of silently discarding them - #24

Merged
bamnet merged 3 commits into
masterfrom
issue-14-parse-errors
Jun 29, 2026
Merged

Surface parse errors instead of silently discarding them#24
bamnet merged 3 commits into
masterfrom
issue-14-parse-errors

Conversation

@bamnet-bot

Copy link
Copy Markdown
Collaborator

Fixes #14

  • Adds ParseError type with Field, Value, and underlying error
  • Adds ParseErrors []error field to Train, StationTrain, and StationStop structs
  • Collects parse errors from time and coordinate parsing instead of silently discarding
  • Includes tests verifying parse errors are surfaced for StationData and VehicleData

Add ParseError type and ParseErrors fields to Train, StationTrain, and
StationStop structs. Parse errors from time and coordinate parsing are
now collected and made available to callers for inspection, rather than
being silently discarded.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a custom ParseError type and updates the client to capture and expose parsing errors for dates, times, and coordinates within the StationTrain, StationStop, and Train structs, rather than silently ignoring them. Unit tests have also been added to verify this new error-handling behavior. The feedback points out that in vehicle_data.go, the error check for parseLatLng is deferred until after the Train struct initialization, which is non-idiomatic in Go and should be handled immediately after the function call.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread vehicle_data.go Outdated
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.25%. Comparing base (8371954) to head (8084561).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   85.91%   88.25%   +2.34%     
==========================================
  Files           5        5              
  Lines         291      349      +58     
==========================================
+ Hits          250      308      +58     
  Misses         24       24              
  Partials       17       17              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bamnet
bamnet merged commit 36fecc3 into master Jun 29, 2026
3 checks passed
@bamnet-bot
bamnet-bot deleted the issue-14-parse-errors branch June 29, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface parse errors instead of silently discarding

2 participants