| |
panic!("neither push not patch event");
|
| |
};
|
| |
|
| - |
let mut run = Run::new(*rid, &common.repository.name, whence, now());
|
| + |
let mut run = Run::new(*rid, &common.repository.name, whence, now()?);
|
| |
|
| |
// We run the adapter, but if that fails, we just
|
| |
// log the error. The `Run` value records the
|
| |
}
|
| |
}
|
| |
|
| - |
fn now() -> String {
|
| + |
fn now() -> Result<String, time::error::Format> {
|
| |
let fmt = format_description!("[year]-[month]-[day] [hour]:[minute]:[second]Z");
|
| - |
OffsetDateTime::now_utc().format(fmt).expect("format time")
|
| + |
OffsetDateTime::now_utc().format(fmt)
|
| |
}
|
| |
|
| |
/// All possible errors from this module.
|
| |
#[derive(Debug, thiserror::Error)]
|
| |
#[allow(clippy::large_enum_variant)]
|
| |
pub enum BrokerError {
|
| + |
/// Error formatting a time as a string.
|
| + |
#[error(transparent)]
|
| + |
Timeformat(#[from] time::error::Format),
|
| + |
|
| |
/// Error from an node event subscriber.
|
| |
#[error(transparent)]
|
| |
NodeEvent(#[from] crate::event::NodeEventError),
|