Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download cache: Improve logs on erroneous cases #1545

Closed
gregory-paidis-sonarsource opened this issue Mar 29, 2023 · 0 comments · Fixed by #1550
Closed

Download cache: Improve logs on erroneous cases #1545

gregory-paidis-sonarsource opened this issue Mar 29, 2023 · 0 comments · Fixed by #1550
Assignees
Milestone

Comments

@gregory-paidis-sonarsource
Copy link
Contributor

DownloadEphemeralUrl fetches a json, which looks like:

  • { Url: "...", enabled: true } on cache-hit.
  • { enabled: false } on cache-miss.

Right now, we only handle the success scenario and always try to access jsonData.Uri, which results in a NullReferenceException on the sad-path and the log message is not very friendly:

12:04:06.76  12:04:06.76  WARNING: Incremental PR analysis: an error occurred while retrieving the cache entries! Value cannot be null.
Parameter name: uriString

We should handle the sad-path and make the logs more professional and user-friendly.

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 a pull request may close this issue.

2 participants