diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-14 04:17:24 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-14 04:17:24 +0900 |
| commit | e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0 (patch) | |
| tree | 021d39efbb8ec59d098e06603bf86dae670773e0 /src/remote/activitypub/kernel/like.ts | |
| parent | Update CHANGELOG.md (diff) | |
| download | sharkey-e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0.tar.gz sharkey-e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0.tar.bz2 sharkey-e3b3f8fac14fb4c4d150fb31c11ead1a193a36e0.zip | |
Better error handling
Diffstat (limited to 'src/remote/activitypub/kernel/like.ts')
| -rw-r--r-- | src/remote/activitypub/kernel/like.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index d4fa7bf387..a08b453a89 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -5,7 +5,7 @@ import { Notes } from '../../../models'; export default async (actor: IRemoteUser, activity: ILike) => { 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'); // Transform: // https://misskey.ex/notes/xxxx to |