mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
Updated utilsController.js
Possibly better Cloudflare error handling.
This commit is contained in:
parent
fbd38a8bdd
commit
c952e3e8ce
@ -217,7 +217,9 @@ utilsController.purgeCloudflareCache = async names => {
|
||||
.send({ files: names.concat(thumbs) })
|
||||
.catch(error => error)
|
||||
|
||||
if (purge.body && !purge.body.success) {
|
||||
if (!purge.body) {
|
||||
console.error(`CF: ${purge.toString()}`)
|
||||
} else if (!purge.body.success && purge.body.errors) {
|
||||
purge.body.errors.forEach(error => console.error(`CF: ${error.code}: ${error.message}`))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user