{"record":{"id":"a06790ace10beb08","repo":"gohugoio/hugo","slug":"error-a06790","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/warpc/warpc.go","lineNumber":257,"sourceCode":"\n\tselect {\n\tcase call = <-call.donec:\n\tcase <-p.donec:\n\t\treturn d.zeroR, p.Err()\n\tcase <-ctx.Done():\n\t\treturn d.zeroR, ctx.Err()\n\tcase <-timer.C:\n\t\treturn d.zeroR, errors.New(\"timeout\")\n\t}\n\n\tif call.err != nil {\n\t\treturn d.zeroR, call.err\n\t}\n\n\tresp, err := call.response, p.Err()\n\n\tif err == nil && resp.Header.Err != \"\" {\n\t\terr = errors.New(resp.Header.Err)\n\t}\n\n\treturn resp, err\n}\n\nfunc (d *dispatcher[Q, R]) newCall(q Message[Q]) (*call[Q, R], error) {\n\tif q.Header.ID == 0 {\n\t\tq.Header.ID = d.id.Add(1)\n\t}\n\tif err := q.init(); err != nil {\n\t\treturn nil, err\n\t}\n\tresponseKinds := maphelpers.NewConcurrentMap[string, bool]()\n\tfor _, rk := range q.Header.ResponseKinds {\n\t\tresponseKinds.Set(rk, true)\n\t}\n\tcall := &call[Q, R]{\n\t\tdonec:         make(chan *call[Q, R], 1),","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/internal/warpc/warpc.go#L239-L275","documentation":"Returned by dispatcherPool.Execute in internal/warpc/warpc.go:257 when the WASM codec call completed but the response header carried a non-empty Err string. The {} placeholder is that remote error text — i.e. the codec (webp/avif/etc.) reported a failure of its own.","triggerScenarios":"Any warpc codec invocation (image encode/decode/config) where the WASM plugin populates response.Header.Err — e.g. corrupt input bytes, unsupported color model, or an internal codec assertion.","commonSituations":"Feeding a truncated/corrupt image to the webp or avif codec, an unsupported pixel format, or a codec version that rejects the given parameters.","solutions":["Inspect the full error text Hugo prints (the header Err) for the codec-specific reason.","Validate the source image opens in a standard decoder before passing it to the Hugo pipeline.","Re-encode the source (e.g. PNG/JPEG round-trip) to clear malformed metadata the codec rejects.","Try a different output format to confirm whether the fault is codec-specific."],"exampleFix":"// before\n{{ $webp = $corruptImg.Resize \"800x webp\" }}\n// after (validate first)\n{{ $okImg = $corruptImg | fingerprint }}\n{{ $webp = $okImg.Resize \"800x webp\" }}","handlingStrategy":"validation","validationCode":"// Validate the source decodes cleanly before the warpc pipeline.\n{{ $img := resources.Get \"x.png\" }}\n{{ if not $img }}{{ errorf \"source image missing\" }}{{ end }}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Sanity-check source images with image.DecodeConfig before processing.","Re-encode suspect sources to a clean PNG/JPEG first.","Read the codec's header Err text to pinpoint the cause."],"tags":["wasm","image","codec","warpc"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}