deepseek-ai/deepseek-harness · error · Win32Error
${name} failed (Win32 ${win32Code}): ${detail ?? errorText(a
Error message
${name} failed (Win32 ${win32Code}): ${detail ?? errorText(api, win32Code)} What it means
Error "${name} failed (Win32 ${win32Code}): ${detail ?? errorText(api, win32Code)}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/sandbox/sandbox-windows-acl/src/ffi.ts:499
const length = api.getTempPathW(buffer.length / 2, buffer)
if (length === 0) throwLastError(api, 'GetTempPathW')
if (length > buffer.length / 2) {
throw new Win32Error('GetTempPathW', abi.ERROR_INSUFFICIENT_BUFFER, `required ${length} chars exceed the ${buffer.length / 2}-char buffer; nothing was written`)
}
return buffer.subarray(0, length * 2).toString('utf16le')
}
/**
* Throw a Win32Error for a BOOL-style API failure. MUST be called immediately
* after the failed call so GetLastError is not clobbered by other Win32 calls.
* @param api - the binding table.
* @param name - the failed API's name for the error message.
* @param detail - optional detail overriding the formatted system message.
* @returns never — always throws.
*/
export function throwLastError(api: Win32Bindings, name: string, detail?: string): never {
const win32Code = api.getLastError()
throw new Win32Error(name, win32Code, detail ?? errorText(api, win32Code))
}
/**
* Throw a Win32Error for an HRESULT-style API return value (the value IS the error code).
* @param api - the binding table.
* @param name - the failed API's name for the error message.
* @param win32Code - the API's returned error code.
* @param detail - optional detail overriding the formatted system message.
* @returns never — always throws.
*/
export function throwWin32(api: Win32Bindings, name: string, win32Code: number, detail?: string): never {
throw new Win32Error(name, win32Code, detail ?? errorText(api, win32Code))
}
View on GitHub (pinned to b150a551b8)
Solutions
- Check the Win32 error code against the API documentation and fix the invalid argument or state that caused the call to fail.
- Call GetLastError/FormatMessage for the code and address the reported condition before retrying.
When it happens
Trigger: Thrown at packages/sandbox/sandbox-windows-acl/src/ffi.ts:499 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/8456cdfc1a608d49.
Report an issue: GitHub.