aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/helpers/requests.ts9
-rw-r--r--server/lib/activitypub/actor.ts2
2 files changed, 9 insertions, 2 deletions
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts
index 60c94da81..8dda6c039 100644
--- a/server/helpers/requests.ts
+++ b/server/helpers/requests.ts
@@ -50,7 +50,14 @@ async function downloadImage (url: string, destDir: string, destName: string, si
50 await doRequestAndSaveToFile({ method: 'GET', uri: url }, tmpPath) 50 await doRequestAndSaveToFile({ method: 'GET', uri: url }, tmpPath)
51 51
52 const destPath = join(destDir, destName) 52 const destPath = join(destDir, destName)
53 await processImage({ path: tmpPath }, destPath, size) 53
54 try {
55 await processImage({ path: tmpPath }, destPath, size)
56 } catch (err) {
57 await remove(tmpPath)
58
59 throw err
60 }
54} 61}
55 62
56// --------------------------------------------------------------------------- 63// ---------------------------------------------------------------------------
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 0db75906c..25cd40905 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -270,7 +270,7 @@ async function refreshActorIfNeeded (
270 return { refreshed: true, actor } 270 return { refreshed: true, actor }
271 }) 271 })
272 } catch (err) { 272 } catch (err) {
273 logger.warn('Cannot refresh actor.', { err }) 273 logger.warn('Cannot refresh actor %s.', actor.url, { err })
274 return { actor, refreshed: false } 274 return { actor, refreshed: false }
275 } 275 }
276} 276}