We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf65cd5 commit 69e6d8fCopy full SHA for 69e6d8f
src/assets.ts
@@ -106,6 +106,9 @@ export function setupPublicAssetStrategy(options: ModuleOptions['assets'] = {})
106
let encoding
107
let size = 0
108
res = await fetch(url).then((r) => {
109
+ if (!r.ok) {
110
+ throw new Error(`@nuxt/scripts - Failed to download script: ${url}. ${r.statusText} (${r.status})`)
111
+ }
112
encoding = r.headers.get('content-encoding')
113
const contentLength = r.headers.get('content-length')
114
size = contentLength ? Number(contentLength) / 1024 : 0
0 commit comments