Skip to content

Commit

Permalink
Merge pull request #72 from edgrip/main
Browse files Browse the repository at this point in the history
Fix ErrorWithStatus bubbling
  • Loading branch information
lovasoa authored Aug 27, 2023
2 parents 7912bfb + e100ff0 commit b409e08
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/webserver/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ async fn build_response_header_and_stream<S: Stream<Item = DbItem>>(
log::debug!("finished query");
continue;
}
DbItem::Error(source_err)
if matches!(
source_err.downcast_ref(),
Some(&ErrorWithStatus { status: _ })
) =>
{
return Err(source_err)
}
DbItem::Error(source_err) => head_context.handle_error(source_err).await?,
};
match page_context {
Expand Down

0 comments on commit b409e08

Please sign in to comment.