From 23cd9de97e90fe7b290ef2f5b644c9c3d84431bb Mon Sep 17 00:00:00 2001 From: Anna Date: Fri, 26 Aug 2022 03:51:25 -0400 Subject: [PATCH] fix(server): use correct error type --- server/src/web.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/web.rs b/server/src/web.rs index 27ca12f..4451bc5 100644 --- a/server/src/web.rs +++ b/server/src/web.rs @@ -450,7 +450,7 @@ fn contribute_multiple(state: Arc) -> BoxedFilter<(impl Reply, )> { warp::post().and(route).boxed() } -async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> mongodb::error::Result { +async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> Result { if listing.created_world >= 1_000 || listing.home_world >= 1_000 || listing.current_world >= 1_000 { anyhow::bail!("invalid listing"); } @@ -482,4 +482,5 @@ async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> mongo opts, ) .await + .context("could not insert record") }