"""Exception classes for WhatsApp SDK.
Custom exceptions for different error scenarios in the SDK.
"""
from __future__ import annotations
[docs]
class WhatsAppError(Exception):
"""Base exception for all WhatsApp SDK errors."""
[docs]
class WhatsAppAPIError(WhatsAppError):
"""General API error from WhatsApp."""
[docs]
class WhatsAppAuthenticationError(WhatsAppError):
"""Authentication/authorization error."""
[docs]
class WhatsAppRateLimitError(WhatsAppError):
"""Rate limit exceeded error."""
[docs]
class WhatsAppValidationError(WhatsAppError):
"""Request validation error."""
[docs]
class WhatsAppWebhookError(WhatsAppError):
"""Webhook processing error."""
[docs]
class WhatsAppTimeoutError(WhatsAppError):
"""Request timeout error."""
[docs]
class WhatsAppConfigError(WhatsAppError):
"""Configuration error."""