Skip to content

Commit a88b102

Browse files
committed
fix fetch
1 parent 9979a0a commit a88b102

File tree

1 file changed

+5
-2
lines changed
  • turbopack/crates/turbo-tasks-fetch/src

1 file changed

+5
-2
lines changed

turbopack/crates/turbo-tasks-fetch/src/client.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{hash::Hash, sync::LazyLock};
33
use anyhow::Result;
44
use quick_cache::sync::Cache;
55
use turbo_rcstr::RcStr;
6-
use turbo_tasks::{ReadRef, Vc, duration_span, mark_session_dependent};
6+
use turbo_tasks::{Completion, ReadRef, Vc, duration_span};
77

88
use crate::{FetchError, FetchResult, HttpResponse, HttpResponseBody};
99

@@ -121,7 +121,10 @@ impl FetchClientConfig {
121121
Ok(resp) => Ok(Vc::cell(Ok(resp.resolved_cell()))),
122122
Err(err) => {
123123
// the client failed to construct or the HTTP request failed
124-
mark_session_dependent();
124+
// Mark session dependent so we get retried in the next sessions
125+
// In dev our caller will keep going, but in prod builds this will fail the build
126+
// anyway.
127+
Completion::session_dependent().as_side_effect().await?;
125128
Ok(Vc::cell(Err(
126129
FetchError::from_reqwest_error(&err, &url).resolved_cell()
127130
)))

0 commit comments

Comments
 (0)