use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct ProviderErrorEvent<M> {
pub model: Option<String>,
pub metadata: M,
pub http_status: Option<u16>,
pub error: String,
pub endpoint: Option<String>,
}
pub trait ProviderErrorNotifier<M>: Send + Sync {
fn notify_provider_error(&self, event: ProviderErrorEvent<M>);
}
#[derive(Debug, Default)]
pub struct NoopProviderErrorNotifier;
impl<M> ProviderErrorNotifier<M> for NoopProviderErrorNotifier {
fn notify_provider_error(&self, _event: ProviderErrorEvent<M>) {}
}