From 67c3460d251a4e559a1126b5fe66fe996f840010 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 9 Jan 2019 23:52:37 -0800 Subject: HUGE refactor of error types (to use failure) --- rust/src/endpoint_handlers.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'rust/src/endpoint_handlers.rs') 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(), ); } }; -- cgit v1.2.3