{"record":{"id":"abc447b425ac1a13","repo":"phacility/phabricator","slug":"specify-either-specific-factors-with-type-or","errorCode":null,"errorMessage":"Specify either specific factors with \"--type\", or all factors with \"--all-types\", but not both.","messagePattern":"Specify either specific factors with \"--type\", or all factors with \"--all-types\", but not both\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php","lineNumber":95,"sourceCode":"\n      $users_by_username = mpull($users, null, 'getUsername');\n      foreach ($usernames as $username) {\n        if (empty($users_by_username[$username])) {\n          throw new PhutilArgumentUsageException(\n            pht(\n              'No user exists with username \"%s\".',\n              $username));\n        }\n      }\n    } else {\n      $users = null;\n    }\n\n    $types = $args->getArg('type');\n    $provider_phids = $args->getArg('provider');\n    $all_types = $args->getArg('all-types');\n    if ($types && $all_types) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify either specific factors with \"--type\", or all factors with '.\n          '\"--all-types\", but not both.'));\n    } else if ($provider_phids && $all_types) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify either specific factors with \"--provider\", or all factors '.\n          'with \"--all-types\", but not both.'));\n    } else if (!$types && !$all_types && !$provider_phids) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use \"--type <type>\" or \"--provider <phid>\" to specify which '.\n          'factors to strip, or \"--all-types\" to strip all factors. '.\n          'Use `bin/auth list-factors` to show the available factor types '.\n          'or `bin/auth list-mfa-providers` to show available providers.'));\n    }\n\n    $type_map = PhabricatorAuthFactor::getAllFactors();","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php#L77-L113","documentation":"Error \"Specify either specific factors with \"--type\", or all factors with \"--all-types\", but not both.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:95 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"}