diff --git a/src/routes/log/create/+server.ts b/src/routes/log/create/+server.ts index 6c9fa06..03a4e3f 100644 --- a/src/routes/log/create/+server.ts +++ b/src/routes/log/create/+server.ts @@ -52,8 +52,9 @@ export const POST = async ({ request }) => { if (parentUri !== undefined) { const parentPost = await bot.getPost(parentUri) postRef = await parentPost.reply(postPayload) + } else { + throw "a reply was requested but no reply is found" } - throw "a reply was requested but no reply is found" } else { postRef = await bot.post(postPayload) }