requested changes

This commit is contained in:
Daniel Hougaard
2025-07-05 01:56:35 +04:00
parent 0569c7e692
commit 7d2d69fc7d
3 changed files with 6 additions and 6 deletions
@@ -305,7 +305,11 @@ export const accessApprovalPolicyServiceFactory = ({
) as { username: string; sequence?: number }[];
const accessApprovalPolicy = await accessApprovalPolicyDAL.findById(policyId);
if (!accessApprovalPolicy) throw new BadRequestError({ message: "Approval policy not found" });
if (!accessApprovalPolicy) {
throw new NotFoundError({
message: `Access approval policy with ID '${policyId}' not found`
});
}
const currentApprovals = approvals || accessApprovalPolicy.approvals;
if (
@@ -334,9 +338,6 @@ export const accessApprovalPolicyServiceFactory = ({
});
}
if (!accessApprovalPolicy) {
throw new NotFoundError({ message: `Secret approval policy with ID '${policyId}' not found` });
}
const { permission } = await permissionService.getProjectPermission({
actor,
actorId,