lib/plaid/client/thin_client.rb in plaid-kilt-0.5.5 vs lib/plaid/client/thin_client.rb in plaid-kilt-0.6.0
- old
+ new
@@ -49,10 +49,10 @@
end
#generic method for handling the structure of the response. Only creates an error object if there is an error (business error) from Plaid.com. Yields to the block with calling function
def handle(response)
if response.code.eql? 200
- yield(response)
+ yield(response) if block_given?
else
PlaidError.new(response, "Error")
end
end
end
\ No newline at end of file