{"record":{"id":"58bef115ea8d645b","repo":"langchain-ai/langgraph","slug":"field-must-be-greater-than-0","errorCode":null,"errorMessage":"{field} must be greater than 0","messagePattern":"(.+?) must be greater than 0","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/types.py","lineNumber":447,"sourceCode":"    \"\"\"Maximum amount of time that may elapse between retries. In seconds.\"\"\"\n    max_attempts: int = 3\n    \"\"\"Maximum number of attempts to make before giving up, including the first.\"\"\"\n    jitter: bool = True\n    \"\"\"Whether to add random jitter to the interval between retries.\"\"\"\n    retry_on: (\n        type[Exception] | Sequence[type[Exception]] | Callable[[Exception], bool]\n    ) = default_retry_on\n    \"\"\"List of exception classes that should trigger a retry, or a callable that returns `True` for exceptions that should trigger a retry.\"\"\"\n\n\ndef _coerce_timeout_seconds(\n    value: float | timedelta | None, *, field: str\n) -> float | None:\n    if value is None:\n        return None\n    seconds = value.total_seconds() if isinstance(value, timedelta) else float(value)\n    if seconds <= 0:\n        raise ValueError(f\"{field} must be greater than 0\")\n    return seconds\n\n\n@dataclass(**_DC_KWARGS)\nclass TimeoutPolicy:\n    \"\"\"Configuration for timing out node attempts.\n\n    !!! note \"Cooperative cancellation\"\n\n        Timeouts rely on asyncio cancellation. If your node uses synchronous\n        time.sleep() or other CPU-bound work that blocks the GIL, the timeout will not\n        be fired until after the event loop has been released.\n\n    !!! note \"Inline callback dispatch\"\n\n        Under `refresh_on=\"auto\"`, an internal handler refreshes the timeout on any\n        callback event that occurs in the execution of the node or its nested descendants.\n    \"\"\"","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/types.py#L429-L465","documentation":"Error \"{field} must be greater than 0\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/types.py:447 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}