{"record":{"id":"e22e8dc7e0928a11","repo":"phacility/phabricator","slug":"unable-to-identify-the-protocol-for-uri-s-uris","errorCode":null,"errorMessage":"Unable to identify the protocol for URI \"%s\". URIs must be fully qualified and have an identifiable protocol.","messagePattern":"Unable to identify the protocol for URI \"(.+?)\"\\. URIs must be fully qualified and have an identifiable protocol\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/artifact/HarbormasterURIArtifact.php","lineNumber":100,"sourceCode":"        'href' => $uri,\n        'target' => '_blank',\n        'rel' => 'noreferrer',\n      ),\n      $name);\n  }\n\n  public function willCreateArtifact(PhabricatorUser $actor) {\n    $artifact = $this->getBuildArtifact();\n    $uri = $artifact->getProperty('uri');\n    $this->validateURI($uri);\n  }\n\n  private function validateURI($raw_uri) {\n    $uri = new PhutilURI($raw_uri);\n\n    $protocol = $uri->getProtocol();\n    if (!strlen($protocol)) {\n      throw new Exception(\n        pht(\n          'Unable to identify the protocol for URI \"%s\". URIs must be '.\n          'fully qualified and have an identifiable protocol.',\n          $raw_uri));\n    }\n\n    $protocol_key = 'uri.allowed-protocols';\n    $protocols = PhabricatorEnv::getEnvConfig($protocol_key);\n    if (empty($protocols[$protocol])) {\n      throw new Exception(\n        pht(\n          'URI \"%s\" does not have an allowable protocol. Configure '.\n          'protocols in `%s`. Allowed protocols are: %s.',\n          $raw_uri,\n          $protocol_key,\n          implode(', ', array_keys($protocols))));\n    }\n  }","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/artifact/HarbormasterURIArtifact.php#L82-L118","documentation":"Error \"Unable to identify the protocol for URI \"%s\". URIs must be fully qualified and have an identifiable protocol.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/harbormaster/artifact/HarbormasterURIArtifact.php:100 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"}