Skip to content

Commit 43f5758

Browse files
committed
Fix ErrorWithStatus bubbling
Since 0.10.0 ErrorWithStatus show as html error rendering. This leads to breaking Basic Auth mechanism for instance. The fix considers every ErrorWithStatus must not show details as html.
1 parent 7912bfb commit 43f5758

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/webserver/http.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ async fn build_response_header_and_stream<S: Stream<Item = DbItem>>(
159159
log::debug!("finished query");
160160
continue;
161161
}
162+
DbItem::Error(source_err) if matches!(source_err.downcast_ref(), Some(&ErrorWithStatus { status: _ }) ) => return Err(source_err),
162163
DbItem::Error(source_err) => head_context.handle_error(source_err).await?,
163164
};
164165
match page_context {

0 commit comments

Comments
 (0)