{"record":{"id":"63c4102967d5ac5c","repo":"santifer/career-ops","slug":"unsupported-profile-photo-style-style-expecte","errorCode":null,"errorMessage":"Unsupported profile photo style: ${style} (expected rounded, circle, or square)","messagePattern":"Unsupported profile photo style: (.+?) \\(expected rounded, circle, or square\\)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"build-cv-html.mjs","lineNumber":122,"sourceCode":"  }\n  return escapeHtml(url);\n}\n\nfunction sanitizeImageSrc(src) {\n  if (typeof src !== 'string') return '';\n  const value = src.trim();\n  if (IMAGE_DATA_URL_RE.test(value)) return escapeHtml(value);\n  if (/^https?:\\/\\//i.test(value)) return sanitizeUrl(value);\n  return '';\n}\n\nasync function prepareCandidatePhoto(candidate) {\n  const c = candidate && typeof candidate === 'object' ? { ...candidate } : {};\n  const photo = typeof c.photo === 'string' ? c.photo.trim() : '';\n  const style = c.photo_style || c.photoStyle || 'rounded';\n\n  if (!PHOTO_STYLES.has(style)) {\n    throw new Error(`Unsupported profile photo style: ${style} (expected rounded, circle, or square)`);\n  }\n  c.photo_style = style;\n  if (!photo) {\n    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;","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/santifer/career-ops/blob/e7abd431fce9348a95261acac9e0c14779c35df8/build-cv-html.mjs#L104-L140","documentation":"Config validation in the CV HTML builder: the candidate's photo_style (or photoStyle) field is not one of the three supported values in PHOTO_STYLES — rounded, circle, or square. The guard runs before any HTML is generated, so nothing renders until the style is corrected.","triggerScenarios":"Thrown at build-cv-html.mjs:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set photo_style to \"rounded\", \"circle\", or \"square\" in the candidate data / profile","Remove photo_style entirely to fall back to the default (\"rounded\")"],"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"}