{"record":{"id":"a59aca3c896a4b32","repo":"santifer/career-ops","slug":"unsupported-profile-photo-url-scheme-photo-spli","errorCode":null,"errorMessage":"Unsupported profile photo URL scheme: ${photo.split(':', 1)[0]}","messagePattern":"Unsupported profile photo URL scheme: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"build-cv-html.mjs","lineNumber":144,"sourceCode":"    c.photo = '';\n    return c;\n  }\n\n  if (photo.startsWith('data:')) {\n    if (!IMAGE_DATA_URL_RE.test(photo)) {\n      throw new Error('Unsupported profile photo data URL (expected base64 PNG, JPEG, WebP, or GIF)');\n    }\n    c.photo = photo;\n    return c;\n  }\n\n  if (/^https?:\\/\\//i.test(photo)) {\n    c.photo = photo;\n    return c;\n  }\n\n  if (/^[a-z][a-z0-9+.-]+:/i.test(photo)) {\n    throw new Error(`Unsupported profile photo URL scheme: ${photo.split(':', 1)[0]}`);\n  }\n\n  const photoPath = isAbsolute(photo) ? photo : resolve(__dirname, photo);\n  const mime = PHOTO_MIME_BY_EXT.get(extname(photoPath).toLowerCase());\n  if (!mime) {\n    throw new Error(`Unsupported profile photo format: ${photo} (expected PNG, JPEG, WebP, or GIF)`);\n  }\n\n  let bytes;\n  try {\n    bytes = await readFile(photoPath);\n  } catch (err) {\n    throw new Error(`Profile photo not found or unreadable: ${photo} (${err.code || err.message})`);\n  }\n  if (bytes.length === 0) {\n    throw new Error(`Profile photo is empty: ${photo}`);\n  }\n  c.photo = `data:${mime};base64,${bytes.toString('base64')}`;","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/santifer/career-ops/blob/e7abd431fce9348a95261acac9e0c14779c35df8/build-cv-html.mjs#L126-L162","documentation":"Photo scheme validation in the CV HTML builder: the photo value carries a URL scheme (matches /^[a-z][a-z0-9+.-]+:/i) that is neither http(s): nor data:. The interpolated value is the offending scheme prefix — typically file:, ftp:, or blob:. Only https URLs, base64 data URLs, and local file paths (no scheme) are accepted.","triggerScenarios":"Thrown at build-cv-html.mjs:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an https:// URL for remote photos","Use a plain absolute or repo-relative file path for local photos (drop the file: prefix)","Use a base64 data: URL if the image must be embedded"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e7abd431fce9348a95261acac9e0c14779c35df8","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}