{"record":{"id":"0050b060e62b79a6","repo":"langchain-ai/langgraph","slug":"func-must-be-provided","errorCode":null,"errorMessage":"func must be provided","messagePattern":"func must be provided","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint/langgraph/checkpoint/store/base/embed.py","lineNumber":156,"sourceCode":"    def __init__(\n        self,\n        func: EmbeddingsFunc | AEmbeddingsFunc,\n    ) -> None:\n        if func is None:\n            raise ValueError(\"func must be provided\")\n        if _is_async_callable(func):\n            self.afunc = func\n        else:\n            self.func = func","sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint/langgraph/checkpoint/store/base/embed.py#L156","documentation":"Constructor guard in EmbeddingsLambda.__init__: the func argument is None. EmbeddingsLambda exists solely to wrap a sync or async embedding function into the Embeddings interface; with no function there is nothing to adapt, so initialization fails immediately.","triggerScenarios":"Thrown at libs/checkpoint/langgraph/checkpoint/store/base/embed.py:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the embedding function: EmbeddingsLambda(my_embed_fn) where fn takes list[str] and returns list[list[float]]","For async-only functions, pass the coroutine function and use aembed_documents/aembed_query","Or use ensure_embeddings(fn) which wraps the function for you"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","contentChangedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}