Error handing#2
Open
lexiwooood wants to merge 1 commit into
Open
Conversation
|
Error Handling looks good. Only suggestion would be to handle the scenario if "getHistoricalEthPrice()" doesn't return a valid value. If we don't get a number, this might cause a division issue when calculating the "rate". I also noticed two small issues in the rate calculations. I'll open an issue for them. |
TueeNguyen
requested changes
Jan 30, 2022
| try: | ||
| earliestDateString = str(earliestNFTInWalletTimeStamp.date().strftime("%d-%m-%Y")) | ||
| except: | ||
| print("An exception occurred while trying to get earliestNFTInWalletTimeStamp") |
Owner
There was a problem hiding this comment.
I think you can also print the value of the earliestNFTInWalletTimeStamp variable. It can look like this I think
print(f'An exception occurred while trying to get earliestNFTInWalletTimeStamp, got {earliestNFTInWalletTimeStamp}')| currentEthPriceResponse = getCurrentEthPrice() | ||
| currentEthPrice = float(currentEthPriceResponse['result']['ethusd']) | ||
| except: | ||
| print("An exception occurred while trying to get the currrent eth price") |
Owner
There was a problem hiding this comment.
Same with the previous comment
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.
No description provided.