-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supply a custom Faraday connection #72
Comments
https://github.com/getsentry/raven-ruby/pull/54/files is an example of adding timeouts to a faraday-based library. For even more flexibility, it might be worth exposing the connection builder during |
👍 on exposing the entire thing, maybe like Hyperclient that supports |
Another approach would be to make |
It's seems not recommended because a lot of Faraday construction is middleware and you often can't modify the connection after-fact from what I observed in a predictable and useful way. I am open to anything that accomplishes the results we want of course :) |
files_upload
files_upload
)
files_upload
)
I'm using the
files.upload
API, and started getting this error on a few files:The Net::ReadTimeout is coming from using Faraday's default adapter, ie net/http. That happens when the
read_timeout
is exceeded, which defaults to 60 seconds http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#read_timeoutIt's probably not great to go past this in general, but it might be expected for large files. It should be possible to customize the
read_timeout
when theFaraday::Connection
is constructed, but I'm not seeing any way to customize this: https://github.com/dblock/slack-ruby-client/blob/e4c39604b6d00da1e419d63db68e30032f5a08e1/lib/slack/web/faraday/connection.rb#L16-L25I realize I'm on an older version, so I will try upgrading but I don't think that will change anything. I'm still debugging the file in question to determine how big it is, but I figured I'd drop this in case anyone runs into similar.
The text was updated successfully, but these errors were encountered: