{"record":{"id":"4cbcf23718dd9f00","repo":"phacility/phabricator","slug":"config-key-s-is-locked-and-can-only-be-set-in-l","errorCode":null,"errorMessage":"Config key \"%s\" is locked and can only be set in local configuration. To learn more, see \"%s\" in the documentation.","messagePattern":"Config key \"(.+?)\" is locked and can only be set in local configuration\\. To learn more, see \"(.+?)\" in the documentation\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php","lineNumber":115,"sourceCode":"          $value = json_decode($value, true);\n          if (!is_array($value)) {\n            switch ($type) {\n              default:\n                $message = pht(\n                  'Configuration key \"%s\" is of type \"%s\". Specify it in JSON.',\n                  $key,\n                  $type);\n                break;\n            }\n            throw new PhutilArgumentUsageException($message);\n          }\n          break;\n      }\n    }\n\n    $use_database = $args->getArg('database');\n    if ($option->getLocked() && $use_database) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Config key \"%s\" is locked and can only be set in local '.\n          'configuration. To learn more, see \"%s\" in the documentation.',\n          $key,\n          pht('Configuration Guide: Locked and Hidden Configuration')));\n    }\n\n    try {\n      $option->getGroup()->validateOption($option, $value);\n    } catch (PhabricatorConfigValidationException $validation) {\n      // Convert this into a usage exception so we don't dump a stack trace.\n      throw new PhutilArgumentUsageException($validation->getMessage());\n    }\n\n    if ($use_database) {\n      $config_entry = PhabricatorConfigEntry::loadConfigEntry($key);\n      $config_entry->setValue($value);\n","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php#L97-L133","documentation":"Error \"Config key \"%s\" is locked and can only be set in local configuration. To learn more, see \"%s\" in the documentation.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}