diff --git a/packages/api/src/routers/board.ts b/packages/api/src/routers/board.ts index 8180a7b7..fd300312 100644 --- a/packages/api/src/routers/board.ts +++ b/packages/api/src/routers/board.ts @@ -143,6 +143,13 @@ export const boardRouter = createTRPCRouter({ }, ); + if (!result) { + throw new TRPCError({ + message: `Board with public ID ${input.boardPublicId} not found`, + code: "NOT_FOUND", + }); + } + // Generate presigned URLs for workspace member avatars const workspaceWithAvatarUrls = result.workspace ? {