Skip to content

Fix HTTP logs until timestamp format#1009

Open
tmoran6 wants to merge 2 commits into
railwayapp:masterfrom
tmoran6:fix/http-logs-until-date-format
Open

Fix HTTP logs until timestamp format#1009
tmoran6 wants to merge 2 commits into
railwayapp:masterfrom
tmoran6:fix/http-logs-until-date-format

Conversation

@tmoran6

@tmoran6 tmoran6 commented Jul 9, 2026

Copy link
Copy Markdown

railway logs --http --until sends cursor timestamps with a +00:00 offset, which the HTTP logs API rejects as Problem processing request.

This formats HTTP log cursor timestamps with the same nanosecond Z format used by network-flow logs and adds a regression test.

Validation: cargo test; cargo fmt -- --check; cargo clippy.

tmoran6 added 2 commits July 9, 2026 14:15
HTTP log history queries use cursor-style beforeDate and anchorDate fields. The CLI parsed --until into UTC and serialized it with to_rfc3339(), producing +00:00, while the HTTP logs cursor API expects the same Z-suffixed timestamp format already used by network-flow logs. As a result, railway logs --http --until returned the backend's generic Problem processing request error.

This change shares the cursor timestamp formatter between HTTP and network-flow log queries and adds a regression test for bounded HTTP log windows. The original ask was to prepare a Railway CLI fix branch without opening a PR.
Keep the bounded HTTP log fix as small as possible by preserving the existing network-flow log helper and window structure. The only runtime change now maps HTTP log beforeDate and anchorDate through a tiny HTTP timestamp formatter that emits the Z-suffixed cursor timestamp format accepted by the API.

This responds to the request to minimize the patch while retaining the existing function structure.
@m-abdelwahab
m-abdelwahab self-requested a review July 9, 2026 18:30
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