diff --git a/lib/mangopay.rb b/lib/mangopay.rb
index <HASH>..<HASH> 100644
--- a/lib/mangopay.rb
+++ b/lib/mangopay.rb
@@ -104,7 +104,7 @@ module MangoPay
       end
 
       # decode json data
-      data = JSON.load(res.body.to_s) rescue {}
+      data = res.body.to_s.empty? ? {} : JSON.load(res.body.to_s)
 
       unless res.is_a?(Net::HTTPOK)
         raise MangoPay::ResponseError.new(uri, res.code, data)
diff --git a/lib/mangopay/filter_parameters.rb b/lib/mangopay/filter_parameters.rb
index <HASH>..<HASH> 100644
--- a/lib/mangopay/filter_parameters.rb
+++ b/lib/mangopay/filter_parameters.rb
@@ -7,7 +7,7 @@ module MangoPay
       rescue MultiJson::LoadError => e
         return body
       end
-      filter_hash(body, res_confidential_params)
+      filter_hash(body, req_confidential_params)
       JSON.dump(body)
     end
Never rescue StandardError, it's dangerous! And fix request filtered params