Error handling

This commit is contained in:
nyx 2025-01-31 13:54:59 -06:00
parent 5b65009fee
commit dd88e3b653

View file

@ -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,