Increase Mendeley API timeout to 60 seconds

To see if we can fix the 30-second timeout here:

https://forums.zotero.org/discussion/comment/412750/#Comment_412750
This commit is contained in:
Dan Stillman 2022-07-18 08:26:16 -04:00
parent 393b1f8369
commit 8bce2b1fdd

View file

@ -33,7 +33,7 @@ const getNextLinkFromResponse = (response) => {
const apiFetchUrl = async (tokens, url, headers = {}, options = {}) => {
headers = { ...headers, Authorization: `Bearer ${tokens.access_token}` };
options = { ...options, headers };
options = { ...options, headers, timeout: 60000 };
const method = 'GET';
// Run the request. If we see 401 or 403, try to refresh tokens and run the request again