{"record":{"id":"f9d696a0587befb9","repo":"zed-industries/zed","slug":"message-id-is-undefined-json-stringify-message","errorCode":null,"errorMessage":"Message id is undefined: ${JSON.stringify(message)}","messagePattern":"Message id is undefined: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"crates/prettier/src/prettier_server.js","lineNumber":162,"sourceCode":"  } finally {\n    process.stdin.off(\"data\", () => {});\n  }\n}\n\nasync function handleMessage(message, prettier) {\n  const { method, id, params } = message;\n  if (method === undefined) {\n    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        });","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/prettier/src/prettier_server.js#L144-L180","documentation":"github_raw_url parses the URL pasted into the skill-import field and rejects any scheme other than https before any network call is made. The importer only fetches encrypted GitHub traffic, so http://, git://, ftp:// and friends are refused. This is an input-validation error shown in the import UI, not a network failure.","triggerScenarios":"Pasting a URL whose scheme is explicitly not https: http://github.com/owner/repo/blob/main/SKILL.md, git://github.com/..., or ssh://git@github.com/...","commonSituations":"A clipboard manager or browser downgraded the copied URL to http; the user typed the URL by hand and wrote http; the link came from an internal mirror that serves plain http.","solutions":["Change the URL prefix to https://","Copy the link again from the GitHub file page address bar, which always yields https"],"exampleFix":"# before\nhttp://github.com/acme/skills/blob/main/SKILL.md\n\n# after\nhttps://github.com/acme/skills/blob/main/SKILL.md","handlingStrategy":"validation","validationCode":"// Before submitting the import form (same crate exposes this helper):\nif !is_supported_skill_url(&input) {\n    show_inline_hint(\"Use an https:// GitHub .md URL\");\n    return;\n}\n// Or the minimal scheme check:\nif !input.trim().starts_with(\"https://\") {\n    show_inline_hint(\"GitHub skill URLs must use https://\");\n}","typeGuard":"fn is_https_url(input: &str) -> bool {\n    url::Url::parse(input.trim()).map(|u| u.scheme() == \"https\").unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Copy URLs from the GitHub address bar so the scheme is always https","Run URLs through is_supported_skill_url before enabling the import button"],"tags":["url-validation","https","skill-import"],"backgroundTag":"url-scheme-validation","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"}