aboutsummaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-06-09 08:21:57 -0400
committerCara Salter <cara@devcara.com>2022-06-09 08:21:57 -0400
commit420ed7be0b97949f3835eb0fdcc2131908fd7f6a (patch)
treedcaa0ac45503794a5304e7491e46abf3d6e1041b /src/errors.rs
parent504a2218615f28223bd59577132f6aa06c2dd5fd (diff)
downloadsolard-420ed7be0b97949f3835eb0fdcc2131908fd7f6a.tar.gz
solard-420ed7be0b97949f3835eb0fdcc2131908fd7f6a.zip
errors: Add NoneResult
For when you don't need to return anything but still need to return a ServiceError maybe
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 06a0233..d76db92 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -7,7 +7,7 @@ use axum::Json;
#[derive(Debug, Error)]
pub enum ServiceError {
- #[error("Waifulib error: {0}")]
+ #[error("Solarlib error: {0}")]
Solarlib(#[from] solarlib::errors::Error),
#[error("Axum error: {0}")]
@@ -17,6 +17,7 @@ pub enum ServiceError {
pub type StringResult<T = &'static str> = std::result::Result<T, ServiceError>;
pub type JsonResult<T> = std::result::Result<T, ServiceError>;
+pub type NoneResult = std::result::Result<(), ServiceError>;
impl IntoResponse for ServiceError {
fn into_response(self) -> Response {