Skip to content

Commit c022970

Browse files
committed
Fix error type for paid member only groups
1 parent 7776e71 commit c022970

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/functions/entraId.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
EntraInvitationError,
1717
EntraPatchError,
1818
InternalServerError,
19+
ValidationError,
1920
} from "../../common/errors/index.js";
2021
import { getSecretValue } from "../plugins/auth.js";
2122
import { ConfidentialClientApplication } from "@azure/msal-node";
@@ -251,9 +252,8 @@ export async function modifyGroup(
251252
const netId = safeEmail.split("@")[0];
252253
const isPaidMember = checkPaidMembershipFromTable(netId, dynamoClient); // we assume users have been provisioned into the table.
253254
if (!isPaidMember) {
254-
throw new EntraGroupError({
255+
throw new ValidationError({
255256
message: `${netId} is not a paid member. This group requires that all members are paid members.`,
256-
group,
257257
});
258258
}
259259
}

0 commit comments

Comments
 (0)