await doRequestAndSaveToFile({ method: 'GET', uri: url }, tmpPath)
const destPath = join(destDir, destName)
- await processImage({ path: tmpPath }, destPath, size)
+
+ try {
+ await processImage({ path: tmpPath }, destPath, size)
+ } catch (err) {
+ await remove(tmpPath)
+
+ throw err
+ }
}
// ---------------------------------------------------------------------------
return { refreshed: true, actor }
})
} catch (err) {
- logger.warn('Cannot refresh actor.', { err })
+ logger.warn('Cannot refresh actor %s.', actor.url, { err })
return { actor, refreshed: false }
}
}