passbolt/passbolt_api · error · InternalErrorException
Could not retrieve the user passphrase policies.
Error message
Could not retrieve the user passphrase policies.
What it means
UserPassphrasePoliciesGetSettingsController::get catches any Throwable thrown while loading and building the user passphrase policies settings DTO, logs it, and rethrows a generic InternalErrorException. The real cause is hidden from the client and only available in the server logs.
Solutions
- Check the passbolt error log for the logged original error message to find the real cause.
- Verify the organization_settings row for user passphrase policies is valid; correct or delete it so defaults apply.
- Ensure the UserPassphrasePolicies plugin and its migrations are up to date (ddev refresh / run migrations).
Defensive patterns
Strategy: try-catch
Try / catch
try { const settings = await getUserPassphrasePoliciesSettings(); } catch (e) { if (e.isInternalError) fallbackToDefaultsAndCheckServerLogs(); } Prevention
- Keep the plugin and DB migrations in sync across version upgrades.
- Never hand-edit organization_settings rows.
- Monitor server error logs; this 500 always logs the root cause.
When it happens
Trigger: GET the user passphrase policies settings endpoint when the underlying service throws (form validation failure on stored settings, missing organization settings record handling error, DTO construction failure).
Common situations: Stored passphrase policies settings were saved by a newer/older plugin version and no longer validate against the current form; corrupted organization_settings row; plugin version mismatch after an upgrade without running migrations.
Related errors
- Could not retrieve the password policies.
- Could not validate the user passphrase policies settings.
- Could not validate the user passphrase policies settings.
- The Email Notification Settings configs are invalid
- 500
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/892b68bf7abc5caa.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/PassboltEe/UserPassphrasePolicies/src/Controller/UserPassphrasePoliciesGetSettingsController.php:47
* Returns user passphrase policies settings.
*
* @return void
*/
public function get()
{
$userPassphraseGetSettingsService = new UserPassphrasePoliciesGetSettingsService();
try {
$userPassphrasePoliciesSettingsDto = $userPassphraseGetSettingsService->get();
$this->success(
__('The operation was successful.'),
$userPassphrasePoliciesSettingsDto->toFilteredArray()
);
} catch (Throwable $error) {
Log::error($error->getMessage());
throw new InternalErrorException(__('Could not retrieve the user passphrase policies.'));
}
}
}
View on GitHub (pinned to 31c1bbc10f)