Skip to content

Handle geo-lookup failures gracefully in async mode#7

Merged
rameerez merged 1 commit intomainfrom
fix/geo-lookup-graceful-degradation
Feb 24, 2026
Merged

Handle geo-lookup failures gracefully in async mode#7
rameerez merged 1 commit intomainfrom
fix/geo-lookup-graceful-degradation

Conversation

@rameerez
Copy link
Owner

Summary

  • Add graceful error handling when Trackdown.locate fails during async tracking (e.g., private IPs, network errors)
  • Footprints are still created without geo data instead of failing entirely
  • Log error class for better observability in both sync and async paths

Test plan

  • Added test test_async_track_still_enqueues_job_when_geo_lookup_fails
  • All 168 tests pass
  • 94% line coverage maintained

🤖 Generated with Claude Code

When Trackdown.locate fails (e.g., private IP, network error), the
footprint should still be created without geo data rather than failing
the entire tracking call.

- Add rescue block in model.rb for async enqueue path
- Log error class for better observability in both paths
- Add test coverage for graceful degradation behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rameerez rameerez merged commit fbd03ff into main Feb 24, 2026
7 checks passed
@rameerez rameerez deleted the fix/geo-lookup-graceful-degradation branch February 24, 2026 16:13
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.

1 participant