diff --git a/libs/sdk-py/langgraph_sdk/auth/__init__.py b/libs/sdk-py/langgraph_sdk/auth/__init__.py index e0dff9c49..01dfd9143 100644 --- a/libs/sdk-py/langgraph_sdk/auth/__init__.py +++ b/libs/sdk-py/langgraph_sdk/auth/__init__.py @@ -195,7 +195,7 @@ class Auth: - authorization (str | None): The Authorization header value (e.g., "Bearer ") Args: - fn (Callable): The authentication handler function to register. + fn: The authentication handler function to register. Must return a representation of the user. This could be a: - string (the user id) - dict containing {"identity": str, "permissions": list[str]} diff --git a/libs/sdk-py/langgraph_sdk/auth/exceptions.py b/libs/sdk-py/langgraph_sdk/auth/exceptions.py index cd3019259..52b4de668 100644 --- a/libs/sdk-py/langgraph_sdk/auth/exceptions.py +++ b/libs/sdk-py/langgraph_sdk/auth/exceptions.py @@ -10,10 +10,10 @@ class HTTPException(Exception): Since this is defined in the auth module, we default to a 401 status code. Args: - status_code (int, optional): HTTP status code for the error. Defaults to 401 "Unauthorized". - detail (str | None, optional): Detailed error message. If None, uses a default + status_code: HTTP status code for the error. Defaults to 401 "Unauthorized". + detail: Detailed error message. If None, uses a default message based on the status code. - headers (typing.Mapping[str, str] | None, optional): Additional HTTP headers to + headers: Additional HTTP headers to include in the error response. Example: