passbolt/passbolt_api · warning · NotFoundException
The group does not exist.
Error message
The group does not exist.
What it means
Existence check in GroupGetService::getOrFail() (reached via getNotDeletedOrFail): after the UUID format check, the service queries the Groups table by id and throws when no group entity is found. Fires when the group id references a nonexistent or deleted group, returning HTTP 404 so callers can surface 'group not found' to users.
Solutions
- Fetch current groups via GET /groups to obtain a valid id
- Check whether the group was deleted in the admin UI
- Treat 404 as terminal and refresh local group references
Defensive patterns
Strategy: try-catch
Validate before calling
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
if (!UUID_RE.test(groupId)) throw new Error('not a UUID'); Try / catch
try {
const group = await api.get(`/groups/${groupId}`);
} catch (e) {
if (e.response?.status === 404) {
await refreshGroupList(); // id never existed or group was removed
return null;
}
throw e;
} Prevention
- Re-fetch group lists instead of caching ids long-term
- Treat 404 as terminal and clear stale references
- Confirm environment (staging vs prod) when ids mysteriously vanish
When it happens
Trigger: Requesting /groups/{id} (or updates/deletes) with a well-formed UUID that has no matching row, e.g. after the group was hard-deleted or the id never existed.
Common situations: Stale ids in client caches after group deletion, typos when copying ids, tests using fabricated UUIDs, cross-environment id reuse (staging id used in prod).
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- The group does not exist.
- The group does not exist.
- Could not validate group data.
- The favorite does not exist.
- The resource does not exist.
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/1b444bc4e3fdf897.
Report an issue: GitHub.
Appendix: source
Thrown at src/Service/Groups/GroupGetService.php:66
/**
* Get a group by ID or throw relevant HTTP exception.
*
* @param string $groupId The identifier of the group to get
* @return \App\Model\Entity\Group
* @throws \Cake\Http\Exception\BadRequestException If the group identifier is not a valid UUID.
* @throws \Cake\Http\Exception\NotFoundException If the group does not exist.
*/
protected function getOrFail(string $groupId): Group
{
if (!Validation::uuid($groupId)) {
throw new BadRequestException(__('The group identifier should be a valid UUID.'));
}
try {
$group = $this->groupsTable->get($groupId);
} catch (RecordNotFoundException $exception) {
throw new NotFoundException(__('The group does not exist.'));
}
return $group;
}
/**
* Get a group by ID or throw relevant HTTP exception.
*
* @param string $groupId The identifier of the group to get
* @return \App\Model\Entity\Group
* @throws \Cake\Http\Exception\NotFoundException If the group does not exist or is soft deleted
*/
public function getNotDeletedOrFail(string $groupId): Group
{
$group = $this->getOrFail($groupId);
if ($group->deleted) {
throw new NotFoundException(__('The group does not exist.'));
}View on GitHub (pinned to 31c1bbc10f)