Error handling
This commit is contained in:
parent
5b65009fee
commit
dd88e3b653
1 changed files with 5 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue