Add additional logging for API responses #2656
Closed
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.
Work with regards to the Prefare/Bus screens dropping requests
Currently, our Sentry logging logs exceptions thrown and exiting the no data state when parsing an API response. For whatever reason, Sentry seems to not be reporting all of what should be caught errors from network problems.
This adds a bit of additional logging for checking the other non-success responses, assuming failures will still be logged as Request failed and success will just pass through regularly.
My thought here is that if Sentry isn't catching errors, it must be going through properly. If the request isn't just outright failing, then it must be going through the success flow, in which case these new logs should catch it.
Maybe this should be deployed from this branch and only be temporarily run for an hour or so to collect some logs?