{"record":{"id":"19022bd2b965eb79","repo":"ruvnet/ruflo","slug":"failed-to-fetch-wasm-response-status","errorCode":null,"errorMessage":"Failed to fetch WASM: ${response.status}","messagePattern":"Failed to fetch WASM: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/prime-radiant/src/wasm-bridge.ts","lineNumber":260,"sourceCode":"      // optionalDependency at build time (TS2307 when it isn't installed).\n      const pkg: string = 'prime-radiant-advanced-wasm';\n      const primeRadiant = await import(pkg);\n\n      if (typeof primeRadiant.default === 'function') {\n        await primeRadiant.default();\n      }\n\n      this.wasmModule = primeRadiant as unknown as WasmModule;\n      this.bundleSize = 92 * 1024;\n\n      if (this.config.enableLogging) {\n        console.log('[Prime Radiant] WASM module loaded via bundler');\n      }\n    } catch {\n      // Fall back to fetch\n      const response = await fetch(wasmPath);\n      if (!response.ok) {\n        throw new Error(`Failed to fetch WASM: ${response.status}`);\n      }\n\n      const wasmBuffer = await response.arrayBuffer();\n      this.bundleSize = wasmBuffer.byteLength;\n\n      const importObject = this.createImportObject();\n      if (typeof WebAssembly.instantiateStreaming === 'function') {\n        // Streaming compilation (faster)\n        const result = await WebAssembly.instantiateStreaming(\n          fetch(wasmPath),\n          importObject\n        );\n        this.wasmModule = result.instance.exports as unknown as WasmModule;\n      } else {\n        // Standard compilation\n        const wasmModule = await WebAssembly.compile(wasmBuffer);\n        const instance = await WebAssembly.instantiate(wasmModule, importObject as WebAssembly.Imports);\n        this.wasmModule = instance.exports as unknown as WasmModule;","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/prime-radiant/src/wasm-bridge.ts#L242-L278","documentation":"loadWasmBrowser()'s bundler-import fallback failed and the raw fetch of the WASM path came back with a non-OK HTTP status. The status is surfaced so the caller can distinguish 404 (wrong path) from 5xx (serving problem); the WASM module is not loaded.","triggerScenarios":"Thrown at v3/plugins/prime-radiant/src/wasm-bridge.ts:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the WASM URL is reachable and served with the correct MIME type (application/wasm).","Check the HTTP status; fix CORS or hosting configuration if the fetch is rejected."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}