{"record":{"id":"58ddf61befcaab98","repo":"zed-industries/zed","slug":"message-params-options-is-undefined-json-string","errorCode":null,"errorMessage":"Message params.options is undefined: ${JSON.stringify(message)}","messagePattern":"Message params\\.options is undefined: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"crates/prettier/src/prettier_server.js","lineNumber":170,"sourceCode":"    throw new Error(`Message method is undefined: ${JSON.stringify(message)}`);\n  } else if (method == \"initialized\") {\n    return;\n  } else if (method === \"shutdown\") {\n    sendResponse({ result: {} });\n  } else if (method == \"exit\") {\n    process.exit(0);\n  }\n\n  if (id === undefined) {\n    throw new Error(`Message id is undefined: ${JSON.stringify(message)}`);\n  }\n\n  if (method === \"prettier/format\") {\n    if (params === undefined || params.text === undefined) {\n      throw new Error(`Message params.text is undefined: ${JSON.stringify(message)}`);\n    }\n    if (params.options === undefined) {\n      throw new Error(`Message params.options is undefined: ${JSON.stringify(message)}`);\n    }\n\n    let resolvedConfig = {};\n    if (params.options.filepath) {\n      resolvedConfig = (await prettier.prettier.resolveConfig(params.options.filepath, { editorconfig: true })) || {};\n\n      if (params.options.ignorePath) {\n        const fileInfo = await prettier.prettier.getFileInfo(params.options.filepath, {\n          ignorePath: params.options.ignorePath,\n        });\n        if (fileInfo.ignored) {\n          process.stderr.write(\n            `Ignoring file '${params.options.filepath}' based on rules in '${params.options.ignorePath}'\\n`,\n          );\n          sendResponse({ id, result: { text: params.text } });\n          return;\n        }\n      }","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/prettier/src/prettier_server.js#L152-L188","documentation":"For github.com URLs the importer destructures the path as [owner, repo, kind, reference, file_path..]. If the URL has fewer than four path segments after the host, the slice pattern fails and the URL is rejected as not pointing at a blob file. This is the shape check for blob URLs.","triggerScenarios":"A github.com URL with too few path segments: github.com/owner, github.com/owner/repo, github.com/owner/repo/blob, github.com/owner/repo/blob/main — there is no file path after the reference.","commonSituations":"The user pasted the repo or directory page instead of the file page; the URL got truncated when copying; the user edited the URL by hand and dropped segments.","solutions":["Navigate to the .md file on github.com and copy the full blob URL of the form https://github.com/<owner>/<repo>/blob/<ref>/<path>/SKILL.md","Make sure all five parts are present: owner, repo, 'blob', branch/tag/commit, and the file path"],"exampleFix":"# before\nhttps://github.com/acme/skills/blob/main\n\n# after\nhttps://github.com/acme/skills/blob/main/src/SKILL.md","handlingStrategy":"validation","validationCode":"let segments: Vec<&str> = url.path_segments().map(Iterator::collect).unwrap_or_default();\nensure!(segments.len() >= 5, \"Paste a GitHub blob URL that points to a .md file\"); // owner, repo, blob, ref, path...","typeGuard":"fn has_blob_shape(url: &url::Url) -> bool {\n    url.path_segments()\n        .map(|s| s.count() >= 5)\n        .unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Validate the five-part blob shape client-side before the import call","Teach users to copy the URL while viewing the file, not the repo root"],"tags":["url-validation","github","path-parsing"],"backgroundTag":"url-path-parsing","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}