Unverified Commit 6d05f248 authored by Janka Uryga's avatar Janka Uryga Committed by GitHub

build: better error if fetching AMP validator fails (#73851)

if this `fetch` fails it's kinda annoying to find, because it just gets
printed as
```
│ [17:05:40] precompile failed because fetch failed     
```
this change should at least make it easier to find the cause by
searching for the error message:
```
│ [17:20:27] precompile failed because Failed to fetch AMP validator
```
parent 2165fbea
......@@ -2272,7 +2272,9 @@ export async function precompile(task, opts) {
const validatorRes = await fetch(
'https://cdn.ampproject.org/v0/validator_wasm.js'
)
).catch((err) => {
throw new Error('Failed to fetch AMP validator', { cause: err })
})
if (!validatorRes.ok) {
throw new Error(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment