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

Don't log price oracle failures #457

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Don't log price oracle failures #457

merged 1 commit into from
Feb 7, 2023

Conversation

Uxio0
Copy link
Member

@Uxio0 Uxio0 commented Feb 6, 2023

It's not relevant if a price oracle cannot retrieve the price, as there's already an exception returned for that

  • Update price oracle logs from WARNING to DEBUG

It's not relevant if a price oracle cannot retrieve the price, as there's already an exception returned for that

- Update price oracle logs from `WARNING` to `DEBUG`
@Uxio0 Uxio0 requested a review from a team as a code owner February 6, 2023 11:36
@Uxio0 Uxio0 requested review from fmrsabino, moisses89 and hectorgomezv and removed request for a team February 6, 2023 11:36
@coveralls
Copy link

coveralls commented Feb 6, 2023

Pull Request Test Coverage Report for Build 4103225065

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 90.658%

Files with Coverage Reduction New Missed Lines %
gnosis/eth/oracles/oracles.py 5 90.52%
Totals Coverage Status
Change from base Build 4086046848: 0.0%
Covered Lines: 3775
Relevant Lines: 4164

💛 - Coveralls

error_message = f"Cannot get decimals for token={token_address}"
logger.warning(error_message)
raise CannotGetPriceFromOracle(error_message) from e
message = f"Cannot get decimals for token={token_address}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related with the price? I mean, ERC20 should have decimals method.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but when we are calculating the price we use anything that looks like an ERC20, so I wouldn't log this kind of errors. This method is only used from oracles

@Uxio0 Uxio0 merged commit 7242f0e into master Feb 7, 2023
@Uxio0 Uxio0 deleted the dont-log-prices branch February 7, 2023 09:47
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants