mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
correct spec and error reporting
previous commit misused warn_exception which caused a spec to fail
This commit is contained in:
@@ -42,7 +42,7 @@ class DiscourseIpInfo
|
||||
ret[:location] = [ret[:city], ret[:region], ret[:country]].reject(&:blank?).join(", ")
|
||||
end
|
||||
rescue => e
|
||||
Discourse.warn_exception(e, "IP #{ip} could not be looked up in MaxMind GeoLite2-City database.")
|
||||
Discourse.warn_exception(e, message: "IP #{ip} could not be looked up in MaxMind GeoLite2-City database.")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,7 +55,7 @@ class DiscourseIpInfo
|
||||
ret[:organization] = result["autonomous_system_organization"]
|
||||
end
|
||||
rescue => e
|
||||
Discourse.warn_exception(e, "IP #{ip} could not be looked up in MaxMind GeoLite2-ASN database.")
|
||||
Discourse.warn_exception(e, message: "IP #{ip} could not be looked up in MaxMind GeoLite2-ASN database.")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user