summaryrefslogtreecommitdiffstats
path: root/rust/src/endpoint_handlers.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-09 23:52:37 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-09 23:52:37 -0800
commit67c3460d251a4e559a1126b5fe66fe996f840010 (patch)
tree89f0a5f37809a9b439435b9245844d1da18dc483 /rust/src/endpoint_handlers.rs
parenta192b0b84e46179a8f28218dfcbb5eb4e28dbf9d (diff)
downloadfatcat-67c3460d251a4e559a1126b5fe66fe996f840010.tar.gz
fatcat-67c3460d251a4e559a1126b5fe66fe996f840010.zip
HUGE refactor of error types (to use failure)
Diffstat (limited to 'rust/src/endpoint_handlers.rs')
-rw-r--r--rust/src/endpoint_handlers.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/rust/src/endpoint_handlers.rs b/rust/src/endpoint_handlers.rs
index 4dc528bd..78044054 100644
--- a/rust/src/endpoint_handlers.rs
+++ b/rust/src/endpoint_handlers.rs
@@ -129,7 +129,9 @@ impl Server {
.first(conn)?
}
_ => {
- return Err(ErrorKind::MissingOrMultipleExternalId("in lookup".to_string()).into());
+ return Err(
+ FatcatError::MissingOrMultipleExternalId("in lookup".to_string()).into(),
+ );
}
};
@@ -166,7 +168,9 @@ impl Server {
.first(conn)?
}
_ => {
- return Err(ErrorKind::MissingOrMultipleExternalId("in lookup".to_string()).into());
+ return Err(
+ FatcatError::MissingOrMultipleExternalId("in lookup".to_string()).into(),
+ );
}
};
@@ -234,7 +238,9 @@ impl Server {
.first(conn)?
}
_ => {
- return Err(ErrorKind::MissingOrMultipleExternalId("in lookup".to_string()).into());
+ return Err(
+ FatcatError::MissingOrMultipleExternalId("in lookup".to_string()).into(),
+ );
}
};
@@ -313,7 +319,7 @@ impl Server {
}
_ => {
return Err(
- ErrorKind::MissingOrMultipleExternalId("in lookup".to_string()).into(),
+ FatcatError::MissingOrMultipleExternalId("in lookup".to_string()).into(),
);
}
};