{"record":{"id":"4ca3b0f6789588c1","repo":"langchain-ai/langgraph","slug":"blob-decryptor-already-registered","errorCode":null,"errorMessage":"Blob decryptor already registered","messagePattern":"Blob decryptor already registered","errorType":"exception","errorClass":"DuplicateHandlerError","httpStatus":null,"severity":"error","filePath":"libs/sdk-py/langgraph_sdk/encryption/__init__.py","lineNumber":173,"sourceCode":"            async def decrypt_blob(\n                ctx: EncryptionContext, blob: bytes\n            ) -> bytes | DecryptResult[bytes]:\n                # Decrypt the blob using your encryption service\n                return decrypted_blob\n            ```\n\n        Args:\n            fn: The decryption handler function\n\n        Returns:\n            The registered handler function\n\n        Raises:\n            DuplicateHandlerError: If blob decryptor already registered\n            TypeError: If handler has invalid signature\n        \"\"\"\n        if self._parent._blob_decryptor is not None:\n            raise DuplicateHandlerError(\"Blob decryptor already registered\")\n        _validate_handler(fn, \"Blob decryptor\")\n        self._parent._blob_decryptor = fn\n        return fn\n\n    def json(self, fn: _JsonDecryptorT) -> _JsonDecryptorT:\n        \"\"\"Register the JSON decryption handler.\n\n        Example:\n            ```python\n            @encryption.decrypt.json\n            async def decrypt_json(\n                ctx: EncryptionContext, data: dict\n            ) -> dict | DecryptResult[dict]:\n                # Decrypt the data\n                return decrypt_data(data)\n            ```\n\n        Args:","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/sdk-py/langgraph_sdk/encryption/__init__.py#L155-L191","documentation":"Raised (as DuplicateHandlerError) by the encryption context's register decorator when a blob decryptor has already been registered for the context. Only one decryptor per registration slot is allowed; a second registration is rejected to avoid ambiguous decryption behavior. Register the decryptor once.","triggerScenarios":"Thrown at libs/sdk-py/langgraph_sdk/encryption/__init__.py:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the extra @encryption.decrypt.blob registration so only one blob decryptor exists","Route different decryption paths through the single handler based on ctx"],"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"}