summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-07-20 15:06:11 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-07-20 15:06:11 -0700
commitf597cb6c6db592fc338d6d41446748f201966f2e (patch)
tree709f381542a475bf082b5f835f2d05d2f1788c62 /rust/src
parent7bfabb70e57ad2b7534f9aba3bb451ed08214623 (diff)
downloadfatcat-f597cb6c6db592fc338d6d41446748f201966f2e.tar.gz
fatcat-f597cb6c6db592fc338d6d41446748f201966f2e.zip
format InvalidFatcatId errors in API response (hack)
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/api_wrappers.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/rust/src/api_wrappers.rs b/rust/src/api_wrappers.rs
index e10906a8..bc1e61ef 100644
--- a/rust/src/api_wrappers.rs
+++ b/rust/src/api_wrappers.rs
@@ -33,7 +33,8 @@ macro_rules! wrap_entity_handlers {
Err(Error(ErrorKind::Uuid(e), _)) =>
$get_resp::BadRequest(ErrorResponse { message: e.to_string() }),
Err(Error(ErrorKind::InvalidFatcatId(e), _)) =>
- $get_resp::BadRequest(ErrorResponse { message: e.to_string() }),
+ $get_resp::BadRequest(ErrorResponse {
+ message: ErrorKind::InvalidFatcatId(e).to_string() }),
Err(e) => {
error!("{}", e);
$get_resp::GenericError(ErrorResponse { message: e.to_string() })
@@ -55,7 +56,8 @@ macro_rules! wrap_entity_handlers {
Err(Error(ErrorKind::Uuid(e), _)) =>
$post_resp::BadRequest(ErrorResponse { message: e.to_string() }),
Err(Error(ErrorKind::InvalidFatcatId(e), _)) =>
- $post_resp::BadRequest(ErrorResponse { message: e.to_string() }),
+ $post_resp::BadRequest(ErrorResponse {
+ message: ErrorKind::InvalidFatcatId(e).to_string() }),
Err(e) => {
error!("{}", e);
$post_resp::GenericError(ErrorResponse { message: e.to_string() })
@@ -77,7 +79,8 @@ macro_rules! wrap_entity_handlers {
Err(Error(ErrorKind::Uuid(e), _)) =>
$post_batch_resp::BadRequest(ErrorResponse { message: e.to_string() }),
Err(Error(ErrorKind::InvalidFatcatId(e), _)) =>
- $post_batch_resp::BadRequest(ErrorResponse { message: e.to_string() }),
+ $post_batch_resp::BadRequest(ErrorResponse {
+ message: ErrorKind::InvalidFatcatId(e).to_string() }),
Err(e) => {
error!("{}", e);
$post_batch_resp::GenericError(ErrorResponse { message: e.to_string() })
@@ -100,7 +103,8 @@ macro_rules! wrap_entity_handlers {
Err(Error(ErrorKind::Uuid(e), _)) =>
$get_history_resp::BadRequest(ErrorResponse { message: e.to_string() }),
Err(Error(ErrorKind::InvalidFatcatId(e), _)) =>
- $get_history_resp::BadRequest(ErrorResponse { message: e.to_string() }),
+ $get_history_resp::BadRequest(ErrorResponse {
+ message: ErrorKind::InvalidFatcatId(e).to_string() }),
Err(e) => {
error!("{}", e);
$get_history_resp::GenericError(ErrorResponse { message: e.to_string() })