Skip to content

Commit 34165b3

Browse files
committed
fix: handle missing board in board router
1 parent ef0d53d commit 34165b3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/api/src/routers/board.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ export const boardRouter = createTRPCRouter({
143143
},
144144
);
145145

146+
if (!result) {
147+
throw new TRPCError({
148+
message: `Board with public ID ${input.boardPublicId} not found`,
149+
code: "NOT_FOUND",
150+
});
151+
}
152+
146153
// Generate presigned URLs for workspace member avatars
147154
const workspaceWithAvatarUrls = result.workspace
148155
? {

0 commit comments

Comments
 (0)