passbolt/passbolt_api · critical · InternalErrorException
Could not delete the SSO settings.
Error message
Could not delete the SSO settings.
What it means
Thrown when the deleteQuery()->execute() on SsoSettings fails with a generic exception inside delete(). It wraps the cause as InternalErrorException (500), meaning input was valid but the persistence layer failed.
Solutions
- Check the wrapped previous exception in logs for the SQL error
- Run pending migrations and verify cascading deletes on related SSO tables
- Retry after resolving the database lock/outage
Defensive patterns
Strategy: try-catch
Try / catch
try { $service->delete($uac, $id); } catch (InternalErrorException $e) { Log::error($e->getPrevious()); // retry after DB recovery } Prevention
- Keep migrations current
- Watch for lock contention on sso_settings
- Verify FK cascade rules on related tables
When it happens
Trigger: Database connection failure, lock wait timeout, FK constraint (e.g. dependent sso_states/auth tokens not cascading), or trigger errors during the DELETE.
Common situations: InnoDB lock timeouts under concurrent admin actions; missing migration leaving orphaned related rows blocking the delete; replica/disk issues.
Related errors
- Could not delete the draft SSO settings.
- Could not update the SSO settings.
- Could not delete the role, please try again later.
- Could not save the role, please try again later.
- Could not save the SSO state, please try again later.
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/09dc4079336b625d.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/PassboltEe/Sso/src/Service/SsoSettings/SsoSettingsDeleteService.php:68
throw new BadRequestException(__('The SSO setting id should be a uuid.'));
}
$uac->assertIsAdmin();
$ssoSettingsTable = TableRegistry::getTableLocator()->get('Passbolt/Sso.SsoSettings');
try {
/** @var \Passbolt\Sso\Model\Entity\SsoSetting $ssoSetting */
$ssoSetting = $ssoSettingsTable->find()->where(['id' => $id])->firstOrFail();
} catch (RecordNotFoundException $exception) {
throw new NotFoundException(__('The SSO setting does not exist.'), 404, $exception);
}
try {
$ssoSettingsTable->deleteQuery()
->where(['id' => $id])
->execute();
} catch (Exception $exception) {
throw new InternalErrorException(__('Could not delete the SSO settings.'), 500, $exception);
}
// Notify other administrators if an active policy was changed
if ($ssoSetting->status === SsoSetting::STATUS_ACTIVE) {
$event = new Event(
self::AFTER_DELETE_ACTIVE_SSO_SETTINGS_EVENT,
$this,
['uac' => $uac, 'ssoSetting' => $ssoSetting]
);
$ssoSettingsTable->getEventManager()->dispatch($event);
}
}
/**
* Delete all draft settings
*
* @param string $id uuid
* @throws \Cake\Http\Exception\InternalErrorException if the settings could not be deletedView on GitHub (pinned to 31c1bbc10f)