{"record":{"id":"03a9f1f6f0b83111","repo":"phacility/phabricator","slug":"failed-to-fetch-remote-uri-s-after-following-s","errorCode":null,"errorMessage":"Failed to fetch remote URI \"%s\" after following %s redirect(s) (%s): %s","messagePattern":"Failed to fetch remote URI \"(.+?)\" after following (.+?) redirect\\(s\\) \\((.+?)\\): (.+?)","errorType":"exception","errorClass":"PhutilProxyException","httpStatus":null,"severity":"error","filePath":"src/applications/files/storage/PhabricatorFile.php","lineNumber":682,"sourceCode":"        } else {\n          // This is HTTP 2XX, so use the response body to save the file data.\n          // Provide a default name based on the URI, truncating it if the URI\n          // is exceptionally long.\n\n          $default_name = basename($uri);\n          $default_name = id(new PhutilUTF8StringTruncator())\n            ->setMaximumBytes(64)\n            ->truncateString($default_name);\n\n          $params = $params + array(\n            'name' => $default_name,\n          );\n\n          return self::newFromFileData($body, $params);\n        }\n      } catch (Exception $ex) {\n        if ($redirects) {\n          throw new PhutilProxyException(\n            pht(\n              'Failed to fetch remote URI \"%s\" after following %s redirect(s) '.\n              '(%s): %s',\n              $uri,\n              phutil_count($redirects),\n              implode(' > ', array_keys($redirects)),\n              $ex->getMessage()),\n            $ex);\n        } else {\n          throw $ex;\n        }\n      }\n    }\n  }\n\n  public static function normalizeFileName($file_name) {\n    $pattern = \"@[\\\\x00-\\\\x19#%&+!~'\\$\\\"\\/=\\\\\\\\?<> ]+@\";\n    $file_name = preg_replace($pattern, '_', $file_name);","sourceCodeStart":664,"sourceCodeEnd":700,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/storage/PhabricatorFile.php#L664-L700","documentation":"Error \"Failed to fetch remote URI \"%s\" after following %s redirect(s) (%s): %s\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/files/storage/PhabricatorFile.php:682 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"}