From dd88e3b653ebbe2f171f33b7e6e06c544b93211f Mon Sep 17 00:00:00 2001 From: nyx Date: Fri, 31 Jan 2025 13:54:59 -0600 Subject: [PATCH] Error handling --- index.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.mjs b/index.mjs index 349259d..fd676d5 100644 --- a/index.mjs +++ b/index.mjs @@ -77,7 +77,11 @@ async function cmd_quote(room_id, event) { throw new Error( `Failed to POST the image. Response code: ${r.status}`, ); - + await client.replyText( + room_id, + event, + `An error occured: HTTP status ${r.status}`, + ); axios.get(`${config.imag}/api/latest`).then(async (r) => { await client.replyText( room_id,