{"record":{"id":"87bd420c441c165e","repo":"diegosouzapw/OmniRoute","slug":"system-proxy-revert-failed","errorCode":null,"errorMessage":"system proxy revert failed","messagePattern":"system proxy revert failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/mitm/inspector/systemProxyConfig.ts","lineNumber":292,"sourceCode":"  } catch (err) {\n    throw new Error(sanitizeErrorMessage(err) || \"system proxy apply failed\");\n  }\n}\n\n/**\n * Restore the prior configuration captured by `apply()`. No-op if the\n * `previousState` payload does not match a known platform.\n */\nexport async function revert(previousState: PreviousState | unknown): Promise<void> {\n  if (!previousState || typeof previousState !== \"object\") return;\n  const state = previousState as Record<string, unknown>;\n  const platform = state.platform;\n  try {\n    if (platform === \"macos\") await macosRevert(state as unknown as MacOsPreviousState);\n    else if (platform === \"linux\") await linuxRevert(state as unknown as LinuxPreviousState);\n    else if (platform === \"windows\") await windowsRevert(state as unknown as WindowsPreviousState);\n  } catch (err) {\n    throw new Error(sanitizeErrorMessage(err) || \"system proxy revert failed\");\n  }\n}\n","sourceCodeStart":274,"sourceCodeEnd":295,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/mitm/inspector/systemProxyConfig.ts#L274-L295","documentation":"Sanitized catch-all from revert(): restoring the platform's prior proxy configuration (captured by a previous apply()) threw and the error was collapsed to this sentinel. Means the system may still point at the OmniRoute proxy — revert did not complete; the operator may need to reset OS proxy settings manually. Unknown/invalid previousState payloads are silently ignored (no-op) before this path.","triggerScenarios":"Thrown at src/mitm/inspector/systemProxyConfig.ts:292 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Manually clear the system proxy settings (OS network panel) if stale","Retry revert() with the original ApplyResult payload","Check privileges and system command availability on the host"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}