diff options
Diffstat (limited to 'src/errors.rs')
-rw-r--r-- | src/errors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs index 3dda65c..5f2a8dd 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -96,3 +96,10 @@ impl From<async_graphql::Error> for AppError { AppError::BadRequest(value.message) } } + +/// A expo_push_notification_client::ValidationError is mapped to an `AppError::BadRequest` +impl From<expo_push_notification_client::ValidationError> for AppError { + fn from(value: expo_push_notification_client::ValidationError) -> Self { + AppError::BadRequest(value.to_string()) + } +} |