From d3279088e3a816db2c254b957159d5b697dc0f62 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 10 Jul 2022 11:05:51 -0400 Subject: colonies: Fully support {meta, user}-data cloud-init should be able to use this as a seed to properly set up the Planet. --- src/errors.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index 6b3195f..e513343 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -16,6 +16,9 @@ pub enum ServiceError { #[error("SQL error: {0}")] Sql(#[from] sqlx::Error), + #[error("Generic: {0}")] + Generic(#[from] Box), + #[error("Not Found")] NotFound, @@ -23,10 +26,14 @@ pub enum ServiceError { NotAuthorized, } -pub type StringResult = Result; +pub type StringResult = Result; + +pub type StrResult = Result; pub type JsonResult = Result; +pub type NoneResult = Result<(), ServiceError>; + impl IntoResponse for ServiceError { fn into_response(self) -> Response { let body = body::boxed(body::Full::from(self.to_string())); -- cgit v1.2.3