passbolt/passbolt_api · error · NotFoundException
The group does not exist.
Error message
The group does not exist.
What it means
Existence check in GroupsViewController::view(): after validating the id and building the query with the whitelisted 'contain' associations (modifier/profile, users, groups_users, gpgkeys, plus deprecated singular contains), the controller throws when the group lookup returns nothing. Fires when the requested group id matches no existing group, returning HTTP 404.
Solutions
- Refresh the group list (GET /groups.json) and confirm the id still exists
- Verify the id type: check it isn't a user/resource UUID pasted into the groups endpoint
- Confirm the client targets the correct environment/database
- If the group was deleted, recreate it and update references
Example fix
// before
const g = await fetch(`/groups/${id}.json`).then(r => r.json()); // may 404
// after
const res = await fetch(`/groups/${id}.json`);
if (res.status === 404) {
const list = await fetch('/groups.json').then(r => r.json());
id = list.body.find(g => g.name === name)?.id;
}
const g = await fetch(`/groups/${id}.json`).then(r => r.json()); Defensive patterns
Strategy: try-catch
Validate before calling
const groups = await fetch('/groups.json').then(r=>r.json());
const current = groups.body.find(g=>g.id===groupId);
if (!current) throw new Error(`group ${groupId} no longer exists`); Type guard
null
Try / catch
try {
return await fetchGroup(groupId);
} catch (e) {
if (e.status === 404) return refreshAndLookupByName(groupName);
throw e;
} Prevention
- Re-fetch group lists periodically; groups can be deleted by admins
- Never assume a UUID seen once remains valid
- Check you're not passing a user/resource UUID to the groups endpoint
When it happens
Trigger: GET /groups/<uuid>.json where the group was deleted, the UUID is from another instance, or the group is filtered out by query options (e.g. has-users filter matching nothing).
Common situations: Stale UI open after an admin deleted the group; syncing ids across staging/production databases; copy-paste of a similar-looking UUID; passing a resource or user UUID to the groups endpoint by mistake.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- The group does not exist.
- The group does not exist.
- Could not validate group data.
- The favorite does not exist.
- The group id is not valid.
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/ee03c50e78916baf.
Report an issue: GitHub.
Appendix: source
Thrown at src/Controller/Groups/GroupsViewController.php:69
'contain' => [
'modifier', 'modifier.profile', 'my_group_user',
'users', 'groups_users', 'groups_users.user',
'groups_users.user.profile', 'groups_users.user.gpgkey',
// Deprecated contains, use plural form instead
// @deprecated remove when v2 support is dropped
'user', 'group_user', 'group_user.user', 'group_user.user.profile',
'group_user.user.gpgkey',
],
];
$options = $this->QueryString->get($whitelist);
if (isset($options['contain']['my_group_user'])) {
$options['my_user_id'] = $this->User->id();
}
// Retrieve the group.
$group = $groupsTable->findView($id, $options)->first();
if (empty($group)) {
throw new NotFoundException(__('The group does not exist.'));
}
$this->success(__('The operation was successful.'), $group);
}
}
View on GitHub (pinned to 31c1bbc10f)