summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/resolver.ts
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-12-12 00:41:26 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-12-12 00:41:26 +0900
commit43f3f8a05883f5bbaca6fce1b45ada7228b15e4c (patch)
treecbb2e2ac013f2d92721009805cfd4708a3668daa /src/remote/activitypub/resolver.ts
parentFix #5424 (#5604) (diff)
downloadsharkey-43f3f8a05883f5bbaca6fce1b45ada7228b15e4c.tar.gz
sharkey-43f3f8a05883f5bbaca6fce1b45ada7228b15e4c.tar.bz2
sharkey-43f3f8a05883f5bbaca6fce1b45ada7228b15e4c.zip
Resolve syuilo#5548 (#5607)
Diffstat (limited to 'src/remote/activitypub/resolver.ts')
-rw-r--r--src/remote/activitypub/resolver.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/remote/activitypub/resolver.ts b/src/remote/activitypub/resolver.ts
index 5b82244536..8688b79a40 100644
--- a/src/remote/activitypub/resolver.ts
+++ b/src/remote/activitypub/resolver.ts
@@ -51,6 +51,13 @@ export default class Resolver {
Accept: 'application/activity+json, application/ld+json'
},
json: true
+ }).catch(e => {
+ const message = `${e.name}: ${e.message ? e.message.substr(0, 200) : undefined}, url=${value}`;
+ throw {
+ name: e.name,
+ statusCode: e.statusCode,
+ message,
+ };
});
if (object == null || (