fix: avoid error failing to delete message that doesn't exist
This commit is contained in:
@@ -100,7 +100,13 @@ app.openapi(route, async (c) => {
|
||||
titleId,
|
||||
);
|
||||
if (messageId) {
|
||||
try {
|
||||
await client.messages.delete(messageId);
|
||||
} catch (error) {
|
||||
if (!error.message.contains("not found")) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
await deleteTitleMessage(env<Env, typeof c>(c, "workerd"), titleId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user