OSDN Git Service

t#30487:fix export error
[pettanr/pettanr.git] / app / controllers / application_controller.rb
index 3535232..c907a51 100644 (file)
@@ -108,8 +108,13 @@ class ApplicationController < ActionController::Base
   end
   
   def export_from_provider url
-    json = RestClient.get url
-    JSON.parse json
+    res = nil
+    begin
+      json = RestClient.get url
+      res = JSON.parse json
+    rescue
+    end
+    res
   end
   
   def export_by action, provider_status, ymd