From 333f1baa2a06c97c59fbaae004c378e7e73d2f54 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Wed, 4 Mar 2026 16:32:20 -0600 Subject: [PATCH] make better error --- src/api/util/handlers/Message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts index 019fb4c0e..5aa780ffe 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts @@ -107,7 +107,7 @@ function checkActionRow(row: ActionRowComponent, knownComponentIds: string[], er } } async function processMedia(media: UnfurledMediaItem, messageId: string, batchId: string, user: User, channel: Channel, id: string): Promise<(() => void) | void> { - if (Object.keys(media).length > 1) throw new HTTPError("no, you can't send those"); + if (Object.keys(media).length > 1) throw new HTTPError("Extra keys for media items are not allowed"); if (!URL.canParse(media.url)) throw new HTTPError("media URL must be a URI"); const url = new URL(media.url); if (!["http:", "https:", "attachment:"].includes(url.protocol)) throw new HTTPError("invalid media protocol");