larastvel_core/notifications/
error.rs1use thiserror::Error;
2
3use super::types::NotificationChannel;
4
5#[derive(Debug, Error)]
7pub enum NotificationError {
8 #[error("Channel {0} is not supported by this notification")]
10 ChannelNotSupported(String),
11
12 #[error("Channel {0} is not configured on the sender")]
14 ChannelNotConfigured(String),
15
16 #[error("Invalid recipient: {0}")]
18 InvalidRecipient(String),
19
20 #[error(transparent)]
22 Mail(#[from] crate::mail::MailError),
23
24 #[error(transparent)]
26 Broadcast(#[from] crate::broadcasting::BroadcastError),
27
28 #[error("Database error: {0}")]
30 Database(String),
31
32 #[error("Webhook error: {0}")]
34 Webhook(String),
35
36 #[error(transparent)]
38 Sms(#[from] crate::sms::SmsError),
39
40 #[error("Partial delivery: {0:?}")]
42 PartialDelivery(Vec<(NotificationChannel, NotificationError)>),
43}