Chore: Better error messages

This commit is contained in:
Daniel Hougaard
2024-03-13 10:51:46 +01:00
parent 36efa6ba63
commit 60fbd8ac44

View File

@@ -83,6 +83,9 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
actor: req.permission.type,
actorOrgId: req.permission.orgId
});
if (!workspace) throw new BadRequestError({ message: `No project found with slug ${req.query.workspaceSlug}` });
workspaceId = workspace.id;
}