Repository navigation
fix: accept status text as an OpenF1 session result position - #60
Merged
Merged
Conversation
OpenF1 reports position as a string (e.g. "RT") for a driver with no time. Decoding it into *int failed the whole session_result list, so the latest session fell back to the previous one with a misleading "results not available yet" note. Accept a number, null or a status string, and show the status text in the time column when there is no time.
When the newest session's results can't be fetched, the response falls back to the previous session but dropped the error that explained why, so the widget just said results weren't available yet. Carry upstream_error over so the cause is visible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenF1's
session_resultcan returnpositionas a string (e.g."RT"for a driver who set no time) instead of an integer. Decoding it into*intfailed the whole result list, so/f1/latest_session/fell back to the previous session and reported the new one as "not available yet", indefinitely.Seen on the 2026 Singapore qualifying (session 11384, driver 6): OpenF1 had all 22 results, but the API kept serving the Sprint Race with
pending: Qualifying.positionnow accepts a number, null or a string (sessionPosition).upstream_error, which was dropped before and hid the real cause.upstream_erroron the fallback.