Skip to content

Commit d2d3caa

Browse files
add error if there is no porject for user
1 parent f14c61d commit d2d3caa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/server/api/src/app/authentication/new-user/organization-assignment.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ export async function assignDefaultOrganization(user: User): Promise<void> {
3939
email: user.email,
4040
workspaceId: project.tablesWorkspaceId,
4141
});
42+
} else {
43+
throw new ApplicationError({
44+
code: ErrorCode.ENTITY_NOT_FOUND,
45+
params: {
46+
message: 'No project found for user',
47+
},
48+
});
4249
}
4350
}
4451

0 commit comments

Comments
 (0)