diff --git a/crates/lib/pager/src/client/pager.rs b/crates/lib/pager/src/client/pager.rs index 64dd45fbde..eefae2bb3b 100644 --- a/crates/lib/pager/src/client/pager.rs +++ b/crates/lib/pager/src/client/pager.rs @@ -71,7 +71,7 @@ impl Pager { notification: NotificationDetails, ) -> Result<(), PagerError> { let queue = self.queue.as_ref() - .ok_or(PagerSystemError::QueueFull)?; + .ok_or(PagerSystemError::QueueNotConfigured)?; let dropped = queue.push(notification)?; diff --git a/crates/lib/pager/src/error/pager_system_error.rs b/crates/lib/pager/src/error/pager_system_error.rs index 0ae6433664..85e5486fd4 100644 --- a/crates/lib/pager/src/error/pager_system_error.rs +++ b/crates/lib/pager/src/error/pager_system_error.rs @@ -7,11 +7,8 @@ pub enum PagerSystemError { /// The pager was not configured with a backend. NoBackendConfigured, - /// The pager was not configured with an application name. - NoApplicationName, - - /// The message queue is full and the oldest item was dropped. - QueueFull, + /// The message queue was not configured. Use `build_with_worker()` to enable queuing. + QueueNotConfigured, /// A mutex lock was poisoned (another thread panicked while holding it). MutexPoisoned(String), @@ -23,8 +20,7 @@ impl Display for PagerSystemError { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { match self { Self::NoBackendConfigured => write!(f, "No pager backend configured. Call .rootly() or .client_config() on PagerBuilder."), - Self::NoApplicationName => write!(f, "No application name configured. Call .application_name() on PagerBuilder."), - Self::QueueFull => write!(f, "Pager message queue is full."), + Self::QueueNotConfigured => write!(f, "Pager message queue not configured. Use build_with_worker() to enable queuing."), Self::MutexPoisoned(msg) => write!(f, "Pager mutex poisoned: {}", msg), } }