Skip to content

Commit e828f91

Browse files
committed
feat: ExtractError also checks region_error
Signed-off-by: ekexium <[email protected]>
1 parent cc1bbb7 commit e828f91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/request/plan.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ impl<P: Plan> Clone for ExtractError<P> {
265265
/// returns an `Err` wrapping the error.
266266
///
267267
/// The errors come from two places: `Err` from inner plans, and `Ok(response)`
268-
/// where `response` contains unresolved errors.
268+
/// where `response` contains unresolved errors (`error` and `region_error`).
269269
#[async_trait]
270270
impl<P: Plan> Plan for ExtractError<P>
271271
where
@@ -277,6 +277,8 @@ where
277277
let mut result = self.inner.execute().await?;
278278
if let Some(error) = result.error() {
279279
Err(error)
280+
} else if let Some(error) = result.region_error() {
281+
Err(error)
280282
} else {
281283
Ok(result)
282284
}

0 commit comments

Comments
 (0)