Getting Faraday :: Error :: TimeoutError when creating a map in a balanced gem

I use balanced ruby ​​stone in my rails application to integrate payments.

I send card information and get a valid response. Then I send the card information to my controller and by creating a customer using card_uri .

 buyer = Balanced::Marketplace.my_marketplace.create_buyer(@member.email, card_uri) 

but, I get this error:

 Faraday::Error::TimeoutError (execution expired): 

Can someone tell me what happened? Thanks in advance.

+6
source share
1 answer

I have done something else about this problem, perhaps this is temporary network slowness. The settings are pretty strict for Faraday, so maybe we can weaken them a bit.

When setting up Balanced, try the following:

 Balanced.configure('API_KEY_STRING', :connection_timeout => 30, :read_timeout => 30) 

Hope this helps.

+10
source

Source: https://habr.com/ru/post/928114/


All Articles