{"record":{"id":"fa17b70240aeaa25","repo":"jackwener/OpenCLI","slug":"openreview-label-value-is-not-a-valid-prof","errorCode":null,"errorMessage":"openreview ${label} \"${value}\" is not a valid profile id (expected \"~First_Last1\" or similar; find it on the author's openreview.net profile URL)","messagePattern":"openreview (.+?) \"(.+?)\" is not a valid profile id \\(expected \"~First_Last1\" or similar; find it on the author's openreview\\.net profile URL\\)","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"clis/openreview/utils.js","lineNumber":67,"sourceCode":"    if (!id) {\n        throw new ArgumentError(`openreview ${label} is required`);\n    }\n    if (!ID_PATTERN.test(id)) {\n        throw new ArgumentError(`openreview ${label} \"${value}\" is not a valid forum id (expected 6-20 chars of [A-Za-z0-9_-])`);\n    }\n    return id;\n}\n\n/** OpenReview profile ids are `~...N` slugs and may include dots, hyphens, and Unicode letters. */\nconst PROFILE_ID_PATTERN = /^~(?=.*\\p{L})[\\p{L}\\p{M}0-9._-]+\\d+$/u;\n\nexport function requireProfileId(value, label = 'profile') {\n    const id = String(value ?? '').trim();\n    if (!id) {\n        throw new ArgumentError(`openreview ${label} is required`);\n    }\n    if (!PROFILE_ID_PATTERN.test(id)) {\n        throw new ArgumentError(`openreview ${label} \"${value}\" is not a valid profile id (expected \"~First_Last1\" or similar; find it on the author's openreview.net profile URL)`);\n    }\n    return id;\n}\n\n/** Wrap fetch + json with typed errors so failures never look like empty results. */\nexport async function openreviewFetch(path, label) {\n    const url = `${OPENREVIEW_API}${path}`;\n    let resp;\n    try {\n        resp = await fetch(url);\n    }\n    catch (e) {\n        throw new CommandExecutionError(`Network failure fetching ${label}: ${e?.message ?? e}`, 'Check your network connection and try again.');\n    }\n    if (resp.status === 404) {\n        return null;\n    }\n    if (!resp.ok) {","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/openreview/utils.js#L49-L85","documentation":"requireProfileId throws ArgumentError when the value is non-empty but fails PROFILE_ID_PATTERN: must start with '~', contain at least one Unicode letter, consist of letters/marks/digits/._-, and end with a digit. This prevents querying the API with usernames, emails, or display names.","triggerScenarios":"Passing 'Jane Doe', 'jane@univ.edu', '~JaneDoe' (no trailing digit), 'Jane_Doe1' (missing '~'), or a value with '/' or ':' to profile(args).","commonSituations":"Using the display name or email instead of the OpenReview slug; dropping the trailing number from the profile id; pasting the profile URL instead of the '~...' id; older format ids that no longer match.","solutions":["Use the exact '~First_Last1' id from the author's openreview.net profile URL.","If unsure of the number suffix, search the author on openreview.net and copy the id.","Strip any URL prefix so only the '~...' segment remains."],"exampleFix":"// before\ncli profile 'jane@univ.edu'\n// after\ncli profile '~Jane_Doe1'","handlingStrategy":"validation","validationCode":"const PROFILE_RE = /^~(?=.*\\p{L})[\\p{L}\\p{M}0-9._-]+\\d+$/u;\nif (!PROFILE_RE.test(args.profile)) { console.error(`invalid profile id: ${args.profile}`); process.exit(2); }","typeGuard":"const isValidProfileId = (v) => typeof v === 'string' && /^~(?=.*\\p{L})[\\p{L}\\p{M}0-9._-]+\\d+$/u.test(v.trim());","tryCatchPattern":"try { const pid = requireProfileId(args.profile); } catch (e) { if (e instanceof ArgumentError) { console.error(e.message); process.exit(2); } throw e; }","preventionTips":["Copy the id directly from the author's openreview.net profile URL.","Ensure the id starts with '~' and ends with a digit.","Do not substitute emails or display names for the profile id."],"tags":["validation","argument-error","format-validation"],"backgroundTag":"invalid-identifier-format","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}