Skip to content

Commit 017bd57

Browse files
authored
fix(api): split on failure for bad serde json response (#431)
1 parent 2c9242f commit 017bd57

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,10 @@ impl Client {
15771577
// This is for the case where some sort of network config (e.g. cloudflare) blocks
15781578
// the request and returns invalid content
15791579
true
1580+
} else if let Error::BadSerdeJsonResponse(_) = error {
1581+
// This is for the case where some sort of network config (e.g. cloudflare) blocks
1582+
// the request and returns invalid content
1583+
true
15801584
} else if let Error::ReqwestError { source, .. } = error {
15811585
// Should split timeouts
15821586
source.is_timeout()

0 commit comments

Comments
 (0)