{"record":{"id":"34b7fab6a56b7c56","repo":"diegosouzapw/OmniRoute","slug":"remote-image-exceeded-maxredirects-redirect-lim","errorCode":null,"errorMessage":"Remote image exceeded ${maxRedirects} redirect limit","messagePattern":"Remote image exceeded (.+?) redirect limit","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/shared/network/remoteImageFetch.ts","lineNumber":222,"sourceCode":"    const addresses = await assertHostnameResolvesPublic(currentUrl, guard, lookup);\n    const fetchImpl =\n      injectedFetch ??\n      (pinDns && addresses.length\n        ? createPinnedFetch(addresses[0].address, addresses[0].family)\n        : fetch);\n    const response = await fetchImpl(currentUrl.toString(), {\n      method: \"GET\",\n      redirect: \"manual\",\n      signal,\n    });\n\n    if (response.status >= 300 && response.status < 400) {\n      const location = response.headers.get(\"location\");\n      if (!location) {\n        throw new Error(`Remote image redirect missing Location header (${response.status})`);\n      }\n      if (redirectCount >= maxRedirects) {\n        throw new Error(`Remote image exceeded ${maxRedirects} redirect limit`);\n      }\n      currentUrl = requireHttps(\n        validateRemoteImageUrl(new URL(location, currentUrl), guard),\n        options.enforceHttps === true\n      );\n      continue;\n    }\n\n    if (!response.ok) {\n      throw new Error(`Remote image fetch error ${response.status}`);\n    }\n\n    return {\n      buffer: await readResponseBuffer(response, maxBytes),\n      contentType: response.headers.get(\"content-type\") || \"application/octet-stream\",\n      url: currentUrl.toString(),\n    };\n  }","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/shared/network/remoteImageFetch.ts#L204-L240","documentation":"Error \"Remote image exceeded ${maxRedirects} redirect limit\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/shared/network/remoteImageFetch.ts:222 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}