correct spec and error reporting

previous commit misused warn_exception which caused a spec to fail
This commit is contained in:
Sam
2018-10-31 13:37:54 +11:00
parent 589e3fcaa0
commit 23423ba112
3 changed files with 8 additions and 5 deletions

View File

@@ -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