AI rule action error handling

This commit is contained in:
M66B 2024-05-20 17:55:20 +02:00
parent 7c4b07ea0f
commit 248b2382bc
1 changed files with 7 additions and 1 deletions

View File

@ -1571,7 +1571,13 @@ public class EntityRule {
return true;
}
try {
message.preview = AI.getSummaryText(context, message);
} catch (Throwable ex) {
message.error = Log.formatThrowable(ex);
db.message().setMessageError(message.id, message.error);
return false;
}
db.message().setMessageContent(message.id, message.content, message.language, message.plain_only, message.preview, message.warning);
db.message().setMessageNotifying(message.id, 0);