diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-11 15:30:30 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-11 15:30:30 -0800 |
commit | 3733c096fc2ff837ad28ed487ef9cccff4d1e1ed (patch) | |
tree | fdde450c2e078612742b2f3e7afd641e8ddab6c0 /rust/src/endpoints.rs | |
parent | 011deddfd53abf0eb13fbe292c1a175e1d8fdf7e (diff) | |
download | fatcat-3733c096fc2ff837ad28ed487ef9cccff4d1e1ed.tar.gz fatcat-3733c096fc2ff837ad28ed487ef9cccff4d1e1ed.zip |
refactor out OtherBadRequest (just use BadRequest)
Diffstat (limited to 'rust/src/endpoints.rs')
-rw-r--r-- | rust/src/endpoints.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rust/src/endpoints.rs b/rust/src/endpoints.rs index 8ed428a7..77f70ce0 100644 --- a/rust/src/endpoints.rs +++ b/rust/src/endpoints.rs @@ -707,7 +707,7 @@ impl Api for Server { .transaction(|| { if Some(editor_id.clone()) != editor.editor_id { return Err( - FatcatError::OtherBadRequest("editor_id doesn't match".to_string()).into(), + FatcatError::BadRequest("editor_id doesn't match".to_string()).into(), ); } let auth_context = self.auth_confectionary.require_auth( @@ -972,10 +972,9 @@ impl Api for Server { .transaction(|| { let editgroup_id = FatcatId::from_str(&editgroup_id)?; if Some(editgroup_id.to_string()) != editgroup.editgroup_id { - return Err(FatcatError::OtherBadRequest( - "editgroup_id doesn't match".to_string(), - ) - .into()); + return Err( + FatcatError::BadRequest("editgroup_id doesn't match".to_string()).into(), + ); } let auth_context = self.auth_confectionary.require_auth( &conn, |