Skip to content

fix(backend): return 400 for a malformed day on the relay locations endpoint - #632

Merged
JuliusHenke merged 1 commit into
masterfrom
claude/modest-archimedes-g4d3w1
Oct 22, 2026
Merged

JuliusHenke merged 1 commit into
masterfrom
claude/modest-archimedes-g4d3w1

Conversation

@JuliusHenke

Copy link
Copy Markdown
Member

Summary

  • GET /relay/location/day/{day} called LocalDate.parse(day) on the raw path variable. Input like abc or 2026-13-45 threw an uncaught DateTimeParseException, so clients got a 500 and every such request logged an ERROR with a stack trace (verified on api.tormap.org: /relay/location/day/abc returns 500).
  • Now a malformed day returns 400. Low severity: input validation / log noise, no data exposure. The cache key stays the day string, so CacheService is unaffected.
  • Adds RelayLocationControllerTest (valid day → 200, five malformed days → 400).

Testing

Not run. ./gradlew test failed at dependency resolution (Maven Central returned HTTP 429 in this environment, twice). Please rely on CI before merging. The PR is a draft for that reason.

Deployment notes

None.

Suggested labels: bug, backend.


Generated by Claude Code

…ndpoint

GET /relay/location/day/{day} threw an uncaught DateTimeParseException for
input like "abc", so clients got a 500 and every request logged a stack trace.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMBPvGbLvfEphgrSMN39Ft
@JuliusHenke
JuliusHenke marked this pull request as ready for review October 22, 2026 22:25
@JuliusHenke JuliusHenke added bug Something isn't working backend labels Oct 22, 2026
@JuliusHenke
JuliusHenke merged commit 16b1276 into master Oct 22, 2026
11 of 12 checks passed
@JuliusHenke
JuliusHenke deleted the claude/modest-archimedes-g4d3w1 branch October 22, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants