You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide a way to set timeout on requests made by box-node-sdk #871
Is your feature request related to a problem? Please describe.
Currently the sdk sets no default timeout and provides no official configuration option to limit the request timeout. From @cypress/requestdocumentation regarding timeouts:
Most requests to external servers should have a timeout attached, in case the server is not responding in a timely manner. Without a timeout, your code may have a socket open/consume resources for minutes or more.
During a recent Box outage our application requests were blocked by calls made by the sdk, which by default, retries 5 times before failing. We will reduce number of retries (which is configurable) but would also like a way to limit the request timeout.
We've created a Jira ticket on our side (SDK-3597), and together with the SDK team, we'll establish a schedule related to this feature.
However, I would like to confirm whether adding a timeout field in the configuration, which, when set, will be used in every request, meets your requirements?
If it's possible to make it configurable on the request level, it would be preferable for us; Otherwise, we'll achieve that by setting it right before the call we want it for, using configure, and then revert it.. (unless that approach won't work?)
Adding a timeout at the configuration level would align us with the existing uploadTimeout, and this solution should address your issues. Nevertheless, we will also see how adding it at the request level would look.
Activity
arjankowski commentedon Jan 24, 2024
Hi @chenbauer, thanks for reporting.
We've created a Jira ticket on our side (SDK-3597), and together with the SDK team, we'll establish a schedule related to this feature.
However, I would like to confirm whether adding a
timeoutfield in theconfiguration, which, when set, will be used in every request, meets your requirements?Regards,
Artur
chenbauer commentedon Jan 24, 2024
Hi @arjankowski, thanks for the quick response!
If it's possible to make it configurable on the request level, it would be preferable for us; Otherwise, we'll achieve that by setting it right before the call we want it for, using configure, and then revert it.. (unless that approach won't work?)
Best,
Chen
arjankowski commentedon Jan 24, 2024
Adding a
timeoutat the configuration level would align us with the existing uploadTimeout, and this solution should address your issues. Nevertheless, we will also see how adding it at the request level would look.Regards,
Artur