{"record":{"id":"b99badcdfd22fc93","repo":"diegosouzapw/OmniRoute","slug":"remote-image-fetch-error-response-status","errorCode":null,"errorMessage":"Remote image fetch error ${response.status}","messagePattern":"Remote image fetch error (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/shared/network/remoteImageFetch.ts","lineNumber":232,"sourceCode":"    });\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  }\n\n  throw new Error(`Remote image exceeded ${maxRedirects} redirect limit`);\n}\n\n/** Backward-compatible image-specific entry point. */\nexport async function fetchRemoteImage(\n  input: string | URL,\n  options: RemoteImageFetchOptions = {}\n): Promise<RemoteImageFetchResult> {\n  return fetchRemoteMedia(input, options);","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/shared/network/remoteImageFetch.ts#L214-L250","documentation":"HTTP-status error from fetchRemoteImage(): the upstream responded with a non-2xx, non-3xx status (404, 403, 500, ...). It is the generic failure branch after redirects were handled; the status in the message identifies the upstream outcome.","triggerScenarios":"Thrown at src/shared/network/remoteImageFetch.ts:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the image URL is still valid (404) and accessible (401/403 auth on the media host)","Retry later if the upstream returned 5xx","Ensure any required auth/headers for the media host are supplied via the fetch options","Replace the asset with a working mirror"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}