test(api): harden assistant tool error handling

This commit is contained in:
2026-03-30 11:51:59 +02:00
parent 4ce8577824
commit 7aa32f8a5c
8 changed files with 7898 additions and 381 deletions
+7
View File
@@ -619,6 +619,13 @@ export const notificationRouter = createTRPCRouter({
senderId,
);
if (recipientIds.length === 0) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "No recipients matched the broadcast target.",
});
}
// 4. Create individual notifications for each recipient
const isTask = input.category === "TASK" || input.category === "APPROVAL";