Skip to content

Commit 7579c5a

Browse files
wip(api/verify/is-org-admin): send descriptive error
1 parent 61b80e9 commit 7579c5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/api/verify/is-org-admin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Org } from 'lib/model/org';
33

44
export default function verifyIsOrgAdmin(org: Org, uid: string): void {
55
if (!org.members.includes(uid)) {
6-
const msg = `User (${uid}) is not a ${org.toString()} admin`;
6+
const msg = `You are not a ${org.name} admin. To fix, make sure to select yourself as a "Parent" above and try again.`;
77
throw new APIError(msg, 400);
88
}
99
}

0 commit comments

Comments
 (0)