passbolt/passbolt_api · critical · Cake\Http\Exception\InternalErrorException
Could not save the group, try again later.
Error message
Could not save the group, try again later.
What it means
Final check in GroupsTable::create(): if save() returns false without entity validation errors (e.g. transaction/lock/persistence failure), an InternalErrorException is thrown telling the user to retry later.
Solutions
- Retry the group creation; the message explicitly suggests a transient failure.
- Check database connectivity and server logs for the underlying SQL error.
- Run pending migrations (ddev refresh) to ensure schema is current.
- If persistent, inspect the database (locks, disk space, constraints) before escalating.
Example fix
// before
$group = $this->Groups->create($data, ['userId' => $uId]); // 500 on transient failure
// after
try { $group = $this->Groups->create($data, ['userId' => $uId]); }
catch (InternalErrorException $e) { $this->log($e->getMessage()); // retry once or surface 503
throw $e; } Defensive patterns
Strategy: retry
Validate before calling
$conn = $this->Groups->getConnection();
try { $conn->execute('SELECT 1'); } catch (Exception $e) { throw new ServiceUnavailableException('Database unavailable.'); } Try / catch
try { $group = $this->Groups->create($data, ['userId' => $uId]); }
catch (InternalErrorException $e) {
// transient persistence failure — retry once, then surface 503
$this->log('Group save failed: ' . $e->getMessage());
throw $e;
} Prevention
- Implement bounded retry with backoff for transient DB failures.
- Monitor database health (locks, connections, disk).
- Keep migrations applied to avoid schema-mismatch save failures.
- Alert on InternalErrorException rates from GroupsTable::create().
When it happens
Trigger: save($group) returns false despite no validation errors — database connection loss, deadlocks, constraint failures at the SQL level, or storage backend unavailability.
Common situations: Database under heavy load, missing migrations leaving the groups/tables in an old schema, transaction deadlocks, or disk/full DB server issues.
Related errors
- Could not delete the group
- 500
- Could not create the folder, please try again later.
- Could not create the resource folder relation, please try…
- Could not delete the draft SSO settings.
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/0dbdfb89bf61775b.
Report an issue: GitHub.
Appendix: source
Thrown at src/Model/Table/GroupsTable.php:265
];
$data = array_merge($defaults, $data);
// Check validation rules.
$group = $this->buildEntity($data);
if ($group->getErrors()) {
throw new ValidationException(__('Could not validate group data.'), $group, $this);
}
$groupSaved = $this->save($group);
// Check for validation errors. (associated models too).
if ($group->getErrors()) {
throw new ValidationException(__('Could not validate group data.'), $group, $this);
}
// Check for errors while saving.
if (!$groupSaved) {
throw new InternalErrorException('Could not save the group, try again later.');
}
// Dispatch event.
$eventData = ['group' => $groupSaved, 'requester' => $control];
$event = new Event(static::GROUP_CREATE_SUCCESS_EVENT_NAME, $this, $eventData);
$this->getEventManager()->dispatch($event);
return $groupSaved;
}
/**
* Validate that the a group can be created only if at least one admin is provided.
*
* @param \App\Model\Entity\Group $entity The entity that will be created.
* @param array|null $options options
* @return bool
*/
public function atLeastOneAdminRule(Group $entity, ?array $options = []): boolView on GitHub (pinned to 31c1bbc10f)