{"record":{"id":"2aa646842ad0a559","repo":"paperclipai/paperclip","slug":"value-value-out-of-range-spec-min-spec-ma","errorCode":null,"errorMessage":"Value ${value} out of range [${spec.min}–${spec.max}] for cron ${spec.name} field","messagePattern":"Value (.+?) out of range \\[(.+?)–(.+?)\\] for cron (.+?) field","errorType":"validation","errorClass":"Error","httpStatus":422,"severity":"error","filePath":"server/src/services/cron.ts","lineNumber":180,"sourceCode":"    if (isNaN(val)) {\n      throw new Error(\n        `Invalid value \"${trimmed}\" in cron ${spec.name} field`,\n      );\n    }\n    validateBounds(val, spec);\n    values.add(val);\n  }\n\n  if (values.size === 0) {\n    throw new Error(`Empty result for cron ${spec.name} field`);\n  }\n\n  return [...values].sort((a, b) => a - b);\n}\n\nfunction validateBounds(value: number, spec: FieldSpec): void {\n  if (value < spec.min || value > spec.max) {\n    throw new Error(\n      `Value ${value} out of range [${spec.min}–${spec.max}] for cron ${spec.name} field`,\n    );\n  }\n}\n\n// ---------------------------------------------------------------------------\n// Public API\n// ---------------------------------------------------------------------------\n\n/**\n * Parse a cron expression string into a structured {@link ParsedCron}.\n *\n * @param expression — A standard 5-field cron expression.\n * @returns Parsed cron with sorted valid values for each field.\n * @throws {Error} on invalid syntax.\n *\n * @example\n * ```ts","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/cron.ts#L162-L198","documentation":"Bounds check in validateBounds (called per value from parseField): a parsed integer lies outside the field's min–max (e.g. minute 60, dom 0, month 13). The message reports the value, the allowed closed range, and the field name.","triggerScenarios":"Thrown at server/src/services/cron.ts:180 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the value in the named cron field to fall within the allowed range shown."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}