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 fix autolaunch after changing linux cmd capitalization 2019-12-17 13:38:09 -05:00
batch-actions.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
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 Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
country.js Util to get list of countries 2021-04-21 10:49:31 -04:00
debounce.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
deep-equal.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
default-languages.js SearchInLanguage: honor user's setting before category's setting. 2022-04-22 09:39:23 -04:00
detect-typing.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
detect-user-bandwidth.js Send video bitrate and user bandwidth to Watchman (#7145) 2021-10-06 14:59:33 -04:00
downloadClaim.js Move 'Download' and 'Report Content' into overflow menu. 2021-06-18 15:50:13 -04:00
enhanced-layout.js mobile view 2019-12-20 15:03:18 -05:00
fetch.js Add a timeout on SDK calls to allow specific error messages. 2022-05-04 08:10:17 -04:00
file.js Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
form-validation.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
format-bytes.js use new buffer analytics api 2020-08-07 22:54:29 -04:00
format-credits.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
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 add more info for claim-preview-tile aria label 2021-07-15 18:12:11 -05:00
full-screen.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
generate-thumbnail-name.js style pass for channel edit 2020-07-01 22:04:23 -04:00
handle-fetch.js send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
hex.js hyperchats 2021-04-23 16:20:17 -04:00
lazyImport.js ChunkLoadError: ask user to reload instead of automatically reloading (#139) 2021-10-27 11:07:06 -04:00
lbryURI.js Add option to hide buildUri warnings 2021-11-03 13:01:13 +08:00
livestream.js Sort livestreams per viewCount, descending 2022-05-02 07:26:47 -04:00
merge-claim.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
notifications.js Design fallout patch 2 (#1245) 2022-03-30 17:53:05 +02:00
number.js show total balance on wallet page/header 2021-01-22 11:46:27 -05:00
object.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
parse-data.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
platform.js Use videojs::http-streaming for all except iPhones 2022-04-25 09:14:24 -04:00
publish.js wip 2021-06-08 13:25:52 -04:00
query-params.js [on hold recsys work] Recommended For You (#782) 2022-03-15 15:07:31 -04:00
redux-utils.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
remark-emote.js Fix remark emote (#635) 2022-01-06 09:34:00 -05:00
remark-lbry.js Adjust channel mention regex (#269) 2021-11-10 14:53:42 -05:00
remark-timestamp.js [Comment/Livestream] Markdown and style fixes (#55) 2021-10-12 17:06:20 -04:00
saved-passwords.js Remove deprecated migration 2022-03-02 21:48:40 -05:00
search.js [on hold recsys work] Recommended For You (#782) 2022-03-15 15:07:31 -04:00
set-operations.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
shuffle-array.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
storage.js tus: QuotaExceededError (#935) 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 Chore desktop cleanup (#6896) 2021-08-17 18:34:16 -04:00
swap-json.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
sync-settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
theme.js MAKE ODYSEE EVEN MORE BEAUTIFUL (#539) 2022-02-11 13:50:55 -05:00
throttle.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
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 Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
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 Support drag-and-drop file publishing (#4170) 2020-05-25 10:27:36 -04:00
web.js Fix some RSS issues 2022-02-13 15:25:18 -05:00
zoomWindow.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00