{"record":{"id":"3b8f3b5798e7cd31","repo":"vercel/next.js","slug":"next-js-devtools-invalid-config-patch","errorCode":null,"errorMessage":"[Next.js DevTools] Invalid config patch:","messagePattern":"\\[Next\\.js DevTools\\] Invalid config patch:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/next-devtools/dev-overlay/utils/save-devtools-config.ts","lineNumber":33,"sourceCode":"\n  fetch('/__nextjs_devtools_config', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body,\n    // keepalive in case of fetch interrupted, e.g. navigation or reload\n    keepalive: true,\n  }).catch((error) => {\n    console.warn('[Next.js DevTools] Failed to save config:', {\n      data: body,\n      error,\n    })\n  })\n}\n\nexport function saveDevToolsConfig(patch: DevToolsConfig) {\n  const validation = devToolsConfigSchema.safeParse(patch)\n  if (!validation.success) {\n    console.warn(\n      '[Next.js DevTools] Invalid config patch:',\n      validation.error.message\n    )\n    return\n  }\n\n  queuedConfigPatch = deepMerge(queuedConfigPatch, patch)\n\n  if (timer) {\n    clearTimeout(timer)\n  }\n\n  timer = setTimeout(flushPatch, 120)\n}\n","sourceCodeStart":15,"sourceCodeEnd":48,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/next-devtools/dev-overlay/utils/save-devtools-config.ts#L15-L48","documentation":"saveDevToolsConfig validates the config patch against the zod devToolsConfigSchema before POSTing to /__nextjs_devtools_config; when validation fails it warns with the schema error message and does not send the invalid patch.","triggerScenarios":"Thrown at packages/next/src/next-devtools/dev-overlay/utils/save-devtools-config.ts:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the DevTools config patch so it matches the expected schema."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}