lbry-desktop/ui/constants
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
..
abandon_states.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
action_types.js 1075: Fetch list of my channels that have commented on a claim 2022-05-02 16:07:00 -04:00
cdn_urls.js Paste/drop images directly to markdown editor 2022-04-01 12:36:49 -04:00
claim.js Fix fee estmation 2022-04-05 09:36:06 -04:00
claim_search.js claim_search: support ordering by 'name' 2022-03-01 10:50:07 -05:00
classnames.js Move MAIN_CLASS to constants file for better code-splitting. 2021-12-09 20:58:23 -08:00
collections.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
comment.js List own comments (#7171) 2021-10-01 08:10:27 -04:00
community_channels.js Update spanish channels 2021-12-22 10:01:55 -05:00
country_languages.js Use locale/get response to suggest homepage and language switch (#839) 2022-03-02 09:44:01 -05:00
daemon_settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
email.js simpler email regex 2019-11-18 14:50:29 -05:00
emotes.js Remove localization from emotes and make all names lower case by default 2022-01-06 03:54:47 -08:00
errors.js Add a timeout on SDK calls to allow specific error messages. 2022-05-04 08:10:17 -04:00
file_render_modes.js Limit embed generation to just Audio and Video 2022-02-07 10:21:33 -05:00
form-field.js some recon (#6532) 2021-07-18 13:06:52 -04:00
hashes.js Add hint that results are being filtered by language 2022-02-25 16:53:45 -05:00
homepage_languages.js Move "Wild West" as part of a Category definition 2022-04-20 22:56:14 +08:00
icons.js Add sports icon 2022-04-01 21:49:03 -04:00
keycodes.js Add percentage video duration keybinds› 2022-03-29 22:39:01 -04:00
language-migrations.js Revert "Simplify language lists" 2021-04-06 15:42:27 -04:00
languages.js Use locale/get response to suggest homepage and language switch (#839) 2022-03-02 09:44:01 -05:00
licenses.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
livestream.js Remove old apis 2022-04-22 12:59:34 -04:00
modal_types.js changed repost to open a modal instead of new page 2022-04-12 21:07:39 +08:00
moonpay.js moonpay 2020-06-03 14:16:43 -04:00
navigation.js Fill in remaining Recsys fields 2021-08-03 09:34:36 -04:00
notifications.js MAKE ODYSEE EVEN MORE BEAUTIFUL (#539) 2022-02-11 13:50:55 -05:00
pages.js Bring back repost page from previous changes for direct link 2022-05-03 09:36:25 -04:00
pageTitles.js Bring back repost page from previous changes for direct link 2022-05-03 09:36:25 -04:00
player.js lint 2022-04-26 08:18:41 -04:00
publish_sources.js move publish source state up, when editing livestream only show scheduling option when source is none. 2022-01-05 11:20:57 -05:00
publish_types.js livestream related publish fixes 2021-04-22 10:59:03 -04:00
reactions.js creator only like reactions 2020-10-27 12:27:30 -04:00
report_content.js update reports endpoint. 2022-02-09 15:06:38 -05:00
search.js Revert "Add pagination support to channel search (#791)" 2022-02-23 21:25:12 +08:00
searchable_languages.js Use locale/get response to suggest homepage and language switch (#839) 2022-03-02 09:44:01 -05:00
settings.js Add ability to store quality settings as default 2022-04-26 08:18:41 -04:00
shape_shift.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
shared_preferences.js Option to hide notification count in title bar 2022-03-31 10:23:31 -04:00
sort_options.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
speech_urls.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
stickers.js so much wow 2022-04-29 13:45:42 -04:00
storage.js Uploads: prevent perpetual locked upload 2022-01-03 12:10:55 -05:00
stripe.js Chore desktop cleanup (#6896) 2021-08-17 18:34:16 -04:00
subscriptions.js Fix sidebar subs inefficiencies 2022-03-01 10:50:07 -05:00
supported_browser_languages.js Add hungarian - hu 2022-02-18 13:40:33 -05:00
supported_languages.js Use locale/get response to suggest homepage and language switch (#839) 2022-03-02 09:44:01 -05:00
supported_sub_languages.js support brazilian portugese 2021-04-16 11:16:25 -04:00
tags.js MAKE ODYSEE EVEN MORE BEAUTIFUL (#539) 2022-02-11 13:50:55 -05:00
themes.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
thumbnail_upload_statuses.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
token.js Un-authenticated resolve (#341) 2021-11-24 09:33:34 -05:00
transaction_list.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
transaction_types.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
txo_list.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
urlParams.js [on hold recsys work] Recommended For You (#782) 2022-03-15 15:07:31 -04:00
user.js wip 2021-06-08 13:25:52 -04:00
youtube.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00