use thiserror::Error;
use super::types::NotificationChannel;
#[derive(Debug, Error)]
pub enum NotificationError {
#[error("Channel {0} is not supported by this notification")]
ChannelNotSupported(String),
#[error("Channel {0} is not configured on the sender")]
ChannelNotConfigured(String),
#[error("Invalid recipient: {0}")]
InvalidRecipient(String),
#[error(transparent)]
Mail(#[from] crate::mail::MailError),
#[error(transparent)]
Broadcast(#[from] crate::broadcasting::BroadcastError),
#[error("Database error: {0}")]
Database(String),
#[error("Webhook error: {0}")]
Webhook(String),
#[error(transparent)]
Sms(#[from] crate::sms::SmsError),
#[error("Partial delivery: {0:?}")]
PartialDelivery(Vec<(NotificationChannel, NotificationError)>),
}