summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/kernel/undo/like.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote/activitypub/kernel/undo/like.ts')
-rw-r--r--src/remote/activitypub/kernel/undo/like.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote/activitypub/kernel/undo/like.ts b/src/remote/activitypub/kernel/undo/like.ts
index 75879d697a..2678828a9a 100644
--- a/src/remote/activitypub/kernel/undo/like.ts
+++ b/src/remote/activitypub/kernel/undo/like.ts
@@ -8,13 +8,13 @@ import { Notes } from '../../../../models';
*/
export default async (actor: IRemoteUser, activity: ILike): 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 noteId = id.split('/').pop();
const note = await Notes.findOne(noteId);
if (note == null) {
- throw 'note not found';
+ throw new Error('note not found');
}
await deleteReaction(actor, note);