summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/kernel/undo/block.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-14 04:17:24 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-14 04:17:24 +0900
commite3b3f8fac14fb4c4d150fb31c11ead1a193a36e0 (patch)
tree021d39efbb8ec59d098e06603bf86dae670773e0 /src/remote/activitypub/kernel/undo/block.ts
parentUpdate CHANGELOG.md (diff)
downloadsharkey-e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0.tar.gz
sharkey-e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0.tar.bz2
sharkey-e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0.zip
Better error handling
Diffstat (limited to 'src/remote/activitypub/kernel/undo/block.ts')
-rw-r--r--src/remote/activitypub/kernel/undo/block.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/remote/activitypub/kernel/undo/block.ts b/src/remote/activitypub/kernel/undo/block.ts
index 9c277ed7d2..8ef70a9bef 100644
--- a/src/remote/activitypub/kernel/undo/block.ts
+++ b/src/remote/activitypub/kernel/undo/block.ts
@@ -9,7 +9,7 @@ const logger = apLogger;
export default async (actor: IRemoteUser, activity: IBlock): Promise<void> => {
const id = typeof activity.object == 'string' ? activity.object : activity.object.id;
- if (id == null) throw 'missing id';
+ if (id == null) throw new Error('missing id');
const uri = activity.id || activity;