altametris.sara.core.auth.exceptions

Authentication exceptions for YOLO-SARA.

This module provides custom exceptions for authentication-related errors when interacting with Azure services (Blob Storage, API Management).

All authentication exceptions inherit from AzureAuthenticationError which is already defined in the core exceptions module.

Exceptions

DsAuthError

Base authentication error for DS (Data Science) credentials.

Module Contents

exception altametris.sara.core.auth.exceptions.DsAuthError(message: str, details: dict[str, Any] | None = None)

Bases: altametris.sara.core.exceptions.AzureAuthenticationError

Base authentication error for DS (Data Science) credentials.

This is an alias for AzureAuthenticationError to maintain naming consistency with DsCredentials and DsAuthConfig.

Scenarios: - Authentication failures with DefaultAzureCredential - Missing or invalid environment variables - Service Principal configuration errors - Managed Identity not available - Connection String or SAS Token errors

Example

>>> raise DsAuthError(
...     "Failed to authenticate with Azure",
...     {
...         "auth_method": "managed_identity",
...         "storage_account": "amdsaiazmldev",
...         "suggestion": "Run 'az login' or configure Service Principal"
...     }
... )