fuel_streams_core/stream/
error.rsuse async_nats::{
error,
jetstream::{
consumer::StreamErrorKind,
context::{CreateKeyValueErrorKind, CreateStreamErrorKind},
kv::{CreateError, CreateErrorKind, PutError, WatchErrorKind},
stream::{ConsumerErrorKind, LastRawMessageErrorKind},
},
};
use displaydoc::Display as DisplayDoc;
use thiserror::Error;
#[derive(Error, DisplayDoc, Debug)]
pub enum StreamError {
PublishFailed {
subject_name: String,
#[source]
source: error::Error<CreateErrorKind>,
},
GetLastPublishedFailed(#[from] error::Error<LastRawMessageErrorKind>),
StoreCreation(#[from] error::Error<CreateKeyValueErrorKind>),
StorePublish(#[from] PutError),
StoreSubscribe(#[from] error::Error<WatchErrorKind>),
StreamPublish(#[from] CreateError),
StreamCreation(#[from] error::Error<CreateStreamErrorKind>),
ConsumerCreate(#[from] error::Error<ConsumerErrorKind>),
ConsumerMessages(#[from] error::Error<StreamErrorKind>),
}