Budibase/budibase · error
unexpected response ${response.statusText}
Error message
unexpected response ${response.statusText} What it means
This is the component-library/object-store download helper: it fetches a gzipped tarball via fetchWithBlacklist, checks response.ok, and throws with the HTTP statusText if the fetch was not OK. The response is then piped through unzip + tar extraction. Any non-2xx HTTP status surfaces as this error.
Source
Thrown at packages/backend-core/src/objectStore/objectStore.ts:746
}
return files
})
}
export async function downloadTarballDirect(
url: string,
path: string,
headers = {},
{ followRedirects = true }: { followRedirects?: boolean } = {}
) {
path = sanitizeKey(path)
const response = await fetchWithBlacklist(
url,
{ headers },
{ followRedirects }
)
if (!response.ok) {
throw new Error(`unexpected response ${response.statusText}`)
}
await pipeline(response.body, zlib.createUnzip(), tar.extract(path))
}
export async function downloadTarball(
url: string,
bucketName: string,
path: string
) {
bucketName = sanitizeBucket(bucketName)
path = sanitizeKey(path)
const response = await fetchWithBlacklist(url)
if (!response.ok) {
throw new Error(`unexpected response ${response.statusText}`)
}
const tmpPath = join(budibaseTempDir(), path)View on GitHub (pinned to a81a902e9a)
Solutions
- Check the exact statusText/HTTP code in the message: 404 means the tarball URL no longer exists — fix or update the URL
- 403/401: add auth or make the tarball publicly downloadable; GitHub raw/release URLs must not be private
- Verify network egress — the fetch goes through fetchWithBlacklist, so ensure the host is not blacklisted and no proxy/VPN blocks it
- Retry the operation once network is restored if statusText indicates 502/503
Defensive patterns
Strategy: retry
Validate before calling
const head = await fetch(url, { method: "HEAD" })
if (!head.ok) throw new Error(`Tarball URL invalid: ${head.status}`) Try / catch
try {
await download(url, path)
} catch (err) {
if (err.message.startsWith("unexpected response")) {
// inspect status, fix URL/auth, retry
}
throw err
} Prevention
- HEAD-check tarball URLs before automating downloads
- Pin versions of component libraries so URLs never rot
- Ensure server egress/proxy allows the download host
- Make release assets public or pre-mirror them
When it happens
Trigger: Calling the internal download helper (used to fetch component libraries into the object store / local dir) when the remote URL returns 404, 403, 500 or any other non-2xx status.
Common situations: A component library URL pointing at a removed GitHub release or npm tarball version, a private repo returning 403, a corporate proxy/blacklist intercepting the request, or a mistyped URL in an app's component library config.
Related errors
- Unexpected response when fetching openid-configuration: ${re
- Unexpected response ${response.statusText}
- Failed to retrieve skeleton metadata
- Unable to retrieve docker-compose file - ${response.status}
- Error getting license: ${message}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/81691e2d32639791.
Report an issue: GitHub.