Skip to main content

fx_event_bus/publisher/
errors.rs

1#[derive(thiserror::Error, Debug)]
2pub enum PublisherError {
3    #[error("The event payload could not be serialized to JSON")]
4    SerializationError {
5        hash: i32,
6        name: String,
7        #[source]
8        source: serde_json::Error,
9    },
10
11    #[error("The event could not be written to the database")]
12    DatabaseError {
13        hash: i32,
14        name: String,
15        #[source]
16        source: sqlx::Error,
17    },
18}