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

Handle maxminddb download errors gracefully #27048

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bmwiedemann
Copy link

Handle maxminddb download errors gracefully

Without this patch, we got

/srv/www/vhosts/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil (NoMethodError)
 filename = File.basename(gz_file.path)
                                 ^^^^^
     from /srv/www/vhosts/discourse/lib/tasks/maxminddb.rake:67:in `block (3 levels) in <main>'

note: I don't know how to add tests here. If you deem tests necessary, I'd appreciate some help.

Without this patch, we got
/srv/www/vhosts/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil (NoMethodError)
     filename = File.basename(gz_file.path)
                                     ^^^^^
         from /srv/www/vhosts/discourse/lib/tasks/maxminddb.rake:67:in `block (3 levels) in <main>'
@CLAassistant
Copy link

CLAassistant commented May 16, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants