earendil-works/pi · error
Invalid setting
Error message
Invalid ${settingName} setting: ${String(value)} What it means
Validation helper parseTimeoutSetting: the value stored under the named setting (e.g. httpIdleTimeoutMs or webSocketConnectTimeoutMs) failed parseHttpIdleTimeoutMs — it is not a finite non-negative number (or numeric string) the timeout parser accepts. The named setting in the merged settings file is at fault.
Solutions
- Set the named setting in settings.json to a non-negative number of milliseconds (e.g. 30000) or remove it to use the default
- Check for string values with stray units or typos
- Fix the value in both user and project settings; project overrides are merged last
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/coding-agent/src/core/settings-manager.ts:178 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/0e14b3c4297cefee.
Report an issue: GitHub.
Appendix: source
Thrown at packages/coding-agent/src/core/settings-manager.ts:178
? deepMergeObjects(baseValue, overrideValue)
: overrideValue;
}
return result;
}
/** Deep merge settings: project/overrides take precedence, nested objects merge recursively */
function deepMergeSettings(base: Settings, overrides: Settings): Settings {
return deepMergeObjects(base as Record<string, unknown>, overrides as Record<string, unknown>) as Settings;
}
function parseTimeoutSetting(value: unknown, settingName: string): number | undefined {
const timeoutMs = parseHttpIdleTimeoutMs(value);
if (timeoutMs !== undefined) {
return timeoutMs;
}
if (value !== undefined) {
throw new Error(`Invalid ${settingName} setting: ${String(value)}`);
}
return undefined;
}
export type SettingsScope = "global" | "project";
export interface SettingsManagerCreateOptions {
projectTrusted?: boolean;
}
export interface SettingsStorage {
withLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void;
}
export interface SettingsError {
scope: SettingsScope;
path?: string;
error: Error;View on GitHub (pinned to 4af9d21d3b)