{"record":{"id":"892b68bf7abc5caa","repo":"passbolt/passbolt_api","slug":"could-not-retrieve-the-user-passphrase-policies","errorCode":null,"errorMessage":"Could not retrieve the user passphrase policies.","messagePattern":"Could not retrieve the user passphrase policies\\.","errorType":"http","errorClass":"InternalErrorException","httpStatus":500,"severity":"error","filePath":"plugins/PassboltEe/UserPassphrasePolicies/src/Controller/UserPassphrasePoliciesGetSettingsController.php","lineNumber":47,"sourceCode":"     * Returns user passphrase policies settings.\n     *\n     * @return void\n     */\n    public function get()\n    {\n        $userPassphraseGetSettingsService = new UserPassphrasePoliciesGetSettingsService();\n\n        try {\n            $userPassphrasePoliciesSettingsDto = $userPassphraseGetSettingsService->get();\n\n            $this->success(\n                __('The operation was successful.'),\n                $userPassphrasePoliciesSettingsDto->toFilteredArray()\n            );\n        } catch (Throwable $error) {\n            Log::error($error->getMessage());\n\n            throw new InternalErrorException(__('Could not retrieve the user passphrase policies.'));\n        }\n    }\n}\n","sourceCodeStart":29,"sourceCodeEnd":51,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/UserPassphrasePolicies/src/Controller/UserPassphrasePoliciesGetSettingsController.php#L29-L51","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const settings = await getUserPassphrasePoliciesSettings(); } catch (e) { if (e.isInternalError) fallbackToDefaultsAndCheckServerLogs(); }","preventionTips":["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."],"tags":["user-passphrase-policies","internal-error","settings"],"backgroundTag":"api-error-response","analyzedSha":"31c1bbc10f32808a607fa9bd81891e898779c0bc","analyzedAt":"2026-09-17T00:04:38.960Z","contentChangedAt":"2026-09-17T00:04:38.960Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}