{"record":{"id":"bdcbdb65bb19c8ec","repo":"phacility/phabricator","slug":"specify-the-credential-type-to-revoke-with-type-bdcbdb","errorCode":null,"errorMessage":"Specify the credential type to revoke with \"--type\" or \"--everything\", but not both.","messagePattern":"Specify the credential type to revoke with \"--type\" or \"--everything\", but not both\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php","lineNumber":75,"sourceCode":"    // \"--type\" to filter the list, but not compatible with target selection\n    // flags like \"--from\".\n    $is_list = $args->getArg('list');\n\n    $type = $args->getArg('type');\n    $is_everything = $args->getArg('everything');\n    if ($type === null && !$is_everything) {\n      if ($is_list) {\n        // By default, \"bin/revoke --list\" implies \"--everything\".\n        $types = $all_types;\n      } else {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Specify the credential type to revoke with \"--type\" or specify '.\n            '\"--everything\". Use \"--list\" to list available credential '.\n            'types.'));\n      }\n    } else if (strlen($type) && $is_everything) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify the credential type to revoke with \"--type\" or '.\n          '\"--everything\", but not both.'));\n    } else if ($is_everything) {\n      $types = $all_types;\n    } else {\n      if (empty($all_types[$type])) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Credential type \"%s\" is not valid. Valid credential types '.\n            'are: %s.',\n            $type,\n            implode(', ', array_keys($all_types))));\n      }\n      $types = array($all_types[$type]);\n    }\n\n    $is_everywhere = $args->getArg('everywhere');","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php#L57-L93","documentation":"Error \"Specify the credential type to revoke with \"--type\" or \"--everything\", but not both.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php:75 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"}