Skip to content

Commit

Permalink
chore: add logs for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
kernoeb committed Sep 23, 2023
1 parent 2edcf73 commit d40d757
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/util/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ module.exports = {
logger.info('Initializing curl')
curl = require('./curl')
}

try {
const { data } = instance ? await instance.get(url) : await curl.get(url)
if (data && data.length && !data.includes('500 Internal Server Error') && !data.includes('<!DOCTYPE ')) { // Yeah, that's perfectible
Expand All @@ -167,6 +168,7 @@ module.exports = {
logger.debug(data)
}
} catch (e) {
console.error('Error', url)
logger.debug(e)
}
}
Expand Down

0 comments on commit d40d757

Please sign in to comment.