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

fix: set data to default of None #909

Merged
merged 2 commits into from
Mar 17, 2024
Merged

fix: set data to default of None #909

merged 2 commits into from
Mar 17, 2024

Conversation

maruel
Copy link
Contributor

@maruel maruel commented Mar 14, 2024

Fixes #907

@maruel maruel changed the title Return None instead of throwing when credentials are incorrect fix: Return None instead of throwing when credentials are incorrect Mar 14, 2024
@alandtse
Copy link
Owner

I haven't tested this, did you actually run this to see if it helps? I believe it's harmless enough with the existing code though but would appreciate confirmation.

@maruel
Copy link
Contributor Author

maruel commented Mar 16, 2024

I haven't, I just read the code and found the bug. To reproduce, one has to have expired credentials, to get in the except clause on line 467 and without reload_lock held. I believe this happens if you get there by clicking on the notification. Then line 485 blews up because data is undefined via this code path. This PR just makes sure data is always defined.

@alandtse alandtse changed the title fix: Return None instead of throwing when credentials are incorrect fix: set data to default of None Mar 17, 2024
@alandtse alandtse merged commit cb1ccd6 into alandtse:dev Mar 17, 2024
5 checks passed
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 this pull request may close these issues.

return data statement code path where data is not set
2 participants