Skip to content

Commit

Permalink
revert fetch check
Browse files Browse the repository at this point in the history
  • Loading branch information
opus1269 committed Mar 13, 2019
1 parent cd223e9 commit 963dfa6
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions app/scripts/screensaver/screensaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,25 @@ t._onErrorChanged = async function(ev) {
if ('Google User' === type) {

// first, fetch again and check status - only handle 403 errors
const url = photo.getUrl();
try {
const response = await fetch(url, {
mode: 'no-cors',
method: 'get',
});
const status = response.status;
if (status !== 403) {
// some other problem, don't know how to fix it
_isUpdating = false;
return;
}
} catch (err) {
// some other problem, don't know how to fix it
_isUpdating = false;
return;
}

// 403 error - Google baseUrl likely expired, try to update some photos
// const url = photo.getUrl();
// try {
// const response = await fetch(url, {
// mode: 'no-cors',
// method: 'get',
// });
// const status = response.status;
// if (status !== 403) {
// // some other problem, don't know how to fix it
// _isUpdating = false;
// return;
// }
// } catch (err) {
// // some other problem, don't know how to fix it
// _isUpdating = false;
// return;
// }

// 403 error maybe - Google baseUrl likely expired, try to update some photos

// limit number of calls to Google API per screensaver session
// in case something weird happens
Expand Down

0 comments on commit 963dfa6

Please sign in to comment.