mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-04-24 23:37:00 -05:00
Log errors when requests fail
This commit is contained in:
parent
200e0f0a1f
commit
7a04c40411
|
|
@ -40,5 +40,8 @@ module.exports.update = function() {
|
|||
|
||||
fs.writeFile(`${dataPath}/salmonruncalendar.json`, JSON.stringify({ schedules }));
|
||||
console.info('Updated Salmon Run calendar.');
|
||||
}).catch(e => raven.captureException(e));
|
||||
}).catch(e => {
|
||||
raven.captureException(e);
|
||||
console.error('Couldn\'t update Salmon Run calendar.');
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@ const updateSchedules = function() {
|
|||
|
||||
fs.writeFile(`${dataPath}/schedules.json`, JSON.stringify(response.data));
|
||||
console.info('Updated map schedules.');
|
||||
}).catch(e => raven.captureException(e));
|
||||
}).catch(e => {
|
||||
raven.captureException(e);
|
||||
console.error('Couldn\'t update map schedules.')
|
||||
});
|
||||
}
|
||||
|
||||
const updateTimeline = function() {
|
||||
|
|
@ -39,7 +42,10 @@ const updateTimeline = function() {
|
|||
|
||||
fs.writeFile(`${dataPath}/timeline.json`, JSON.stringify(data));
|
||||
console.info('Updated timeline.');
|
||||
}).catch(e => raven.captureException(e));
|
||||
}).catch(e => {
|
||||
raven.captureException(e);
|
||||
console.error('Couldn\'t update timeline.')
|
||||
});
|
||||
}
|
||||
|
||||
const updateFestivals = function() {
|
||||
|
|
@ -51,7 +57,10 @@ const updateFestivals = function() {
|
|||
|
||||
fs.writeFile(`${dataPath}/festivals-na.json`, JSON.stringify(response.data));
|
||||
console.info('Updated festivals.');
|
||||
}).catch(e => raven.captureException(e));
|
||||
}).catch(e => {
|
||||
raven.captureException(e);
|
||||
console.error('Couldn\'t update festivals.')
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.update = function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user