lib/icarus/mod/tools/sync_helpers.rb in Icarus-Mod-Tools-1.3.2 vs lib/icarus/mod/tools/sync_helpers.rb in Icarus-Mod-Tools-1.3.3

- old
+ new

@@ -10,10 +10,10 @@ # Sync helper methods module SyncHelpers def retrieve_from_url(url) res = Net::HTTP.get_response(URI(url)) - raise "HTTP Request failed (#{res.code}): #{res.message}" unless res&.code == "200" + raise Icarus::Mod::Tools::Error, "HTTP Request failed for #{url} (#{res.code}): #{res.message}" unless res&.code == "200" JSON.parse(res.body, symbolize_names: true) end end end