Cleaned up errors a bit.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::domain::{CentsConversionError, RecurrenceIntervalError, ValidationError};
|
||||
use crate::domain::{CentsError, ScheduleError};
|
||||
|
||||
pub mod dtos;
|
||||
mod encoding;
|
||||
@@ -20,13 +20,7 @@ pub enum RepositoryError {
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum DecodeError {
|
||||
#[error(transparent)]
|
||||
Amount(#[from] CentsConversionError),
|
||||
|
||||
#[error(transparent)]
|
||||
RecurrenceInterval(#[from] RecurrenceIntervalError),
|
||||
|
||||
#[error(transparent)]
|
||||
Invalid(#[from] ValidationError),
|
||||
Amount(#[from] CentsError),
|
||||
|
||||
#[error("invalid direction value: {0}")]
|
||||
Direction(String),
|
||||
@@ -34,6 +28,9 @@ pub enum DecodeError {
|
||||
#[error("invalid recurrence_unit value: {0}")]
|
||||
RecurrenceUnit(String),
|
||||
|
||||
#[error(transparent)]
|
||||
Schedule(#[from] ScheduleError),
|
||||
|
||||
#[error("invalid weekend_adjustment value: {0}")]
|
||||
WeekendAdjustment(String),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user