lbry-desktop/ui/util
infinite-persistence 9b44b7eb91 Add a timeout on SDK calls to allow specific error messages.
## Issue 1263
Previously, we tried to inform the user that when an SDK call such as `support_create` and `publish` fails (specifically, timed out), the operation could be successful -- please check the transactions later.

However, we only covered the case of `fetch` actually getting a response that indicated a timeout, e.g. "status = 524". For our SDK case, the timeout scenario is an error that goes into the `catch` block. In the `catch` block, we can't differentiate whether it is a timeout because it only returns a generic "failed to fetch" message.

## New Approach
Since `fetch` does not support a timeout value, the usual solution is to wrap it with a `setTimeout`. This already exists in our code as `fetchWithTimeout` (yay).

By setting a timeout that is lower than the browser's default and also lower than the SDK operation (90s for most commands, 5m for `publish`), we would now have a way to detect a timeout and inform the user.

Firefox's 90s seems to be the lowest common denominator ... so 60s was chosen as the default (added some buffer).

For the case of 'publish', it is actually called in the backend, so wrap the xhr call with a timeout as well.
2022-05-04 08:10:17 -04:00
..
api-message.js Fix i18n issues reported 2022-03-24 15:36:09 +08:00
autoLaunch.js
batch-actions.js
buildHomepage.js Support not_channel_ids through Category definition 2022-04-20 22:56:16 +08:00
claim.js Add dynamic player aspect ratio resizing 2022-04-07 11:44:25 -04:00
comments.js Fixes 2022-02-08 12:35:40 -05:00
context-menu.js
country.js
debounce.js
deep-equal.js
default-languages.js SearchInLanguage: honor user's setting before category's setting. 2022-04-22 09:39:23 -04:00
detect-typing.js
detect-user-bandwidth.js
downloadClaim.js
enhanced-layout.js
fetch.js Add a timeout on SDK calls to allow specific error messages. 2022-05-04 08:10:17 -04:00
file.js
form-validation.js
format-bytes.js
format-credits.js
formatAriaLabel.js Refactor dateTime component and getTimeAgoStr function to prevent displaying comments as 'in a few seconds' 2022-01-05 09:27:52 -05:00
formatMediaDuration.js
full-screen.js
generate-thumbnail-name.js
handle-fetch.js
hex.js
lazyImport.js
lbryURI.js
livestream.js Sort livestreams per viewCount, descending 2022-05-02 07:26:47 -04:00
merge-claim.js
notifications.js Design fallout patch 2 () 2022-03-30 17:53:05 +02:00
number.js
object.js
parse-data.js
platform.js Use videojs::http-streaming for all except iPhones 2022-04-25 09:14:24 -04:00
publish.js
query-params.js [on hold recsys work] Recommended For You () 2022-03-15 15:07:31 -04:00
redux-utils.js
remark-emote.js Fix remark emote () 2022-01-06 09:34:00 -05:00
remark-lbry.js
remark-timestamp.js
saved-passwords.js Remove deprecated migration 2022-03-02 21:48:40 -05:00
search.js [on hold recsys work] Recommended For You () 2022-03-15 15:07:31 -04:00
set-operations.js
shuffle-array.js
storage.js tus: QuotaExceededError () 2022-02-22 10:11:22 -05:00
string.js Fix sub/view count not in compact form for some components 2022-02-26 10:27:25 -05:00
stripe.js
swap-json.js
sync-settings.js
theme.js MAKE ODYSEE EVEN MORE BEAUTIFUL () 2022-02-11 13:50:55 -05:00
throttle.js
thumbnail.js getImageProxyUrl: don't assume IMAGE_PROXY_URL is always defined 2022-03-29 10:16:52 -04:00
time.js Fix livestream countdown i18n 2022-03-31 08:25:32 -04:00
toast-wrappers.js Reject reaction if already done from another channel. 2022-05-02 16:03:53 -04:00
transifex-upload.js
tus.js Uploads: prevent perpetual locked upload 2022-01-03 12:10:55 -05:00
url.js Fix crash 2022-01-17 23:24:59 -05:00
web-file-system.js
web.js Fix some RSS issues 2022-02-13 15:25:18 -05:00
zoomWindow.js