Skip to content

Commit

Permalink
Remove output type definition in the map_err
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycdot committed Sep 13, 2021
1 parent fa9bead commit 83594a0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions crates/robonode-server/src/logic/op_enroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,14 @@ where
low_quality_audit_trail_image: &liveness_data.low_quality_audit_trail_image,
})
.await
.map_err(|err| -> Error {
match err {
ft::Error::Server(server_error)
if server_error.error_message
== EXTERNAL_DATABASE_REF_ID_ALREADY_IN_USE_ERROR_MESSAGE =>
{
Error::PublicKeyAlreadyUsed
}
_ => Error::InternalErrorEnrollment(err),
.map_err(|err| match err {
ft::Error::Server(server_error)
if server_error.error_message
== EXTERNAL_DATABASE_REF_ID_ALREADY_IN_USE_ERROR_MESSAGE =>
{
Error::PublicKeyAlreadyUsed
}
_ => Error::InternalErrorEnrollment(err),
})?;

trace!(message = "Got FaceTec enroll results", ?enroll_res);
Expand Down

0 comments on commit 83594a0

Please sign in to comment.