mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-18 07:35:19 +00:00
classify gateway timeout
This commit is contained in:
1 parent
fe8939a0f6
commit
914c26b4c6
1 file changed
+6
@@ -57,7 +57,13 @@ Message: {
|
||||
502 => {
|
||||
return SoraError::BadGateway(message);
|
||||
}
|
||||
504 => {
|
||||
if message.contains("cloudflare") || message.contains("Cloudflare") {
|
||||
return SoraError::CloudFlareTimeout(message);
|
||||
}
|
||||
}
|
||||
524 => {
|
||||
// NB: 524 is a cloudflare specific gateway timeout error with slightly different semantics than 504.
|
||||
if message.contains("cloudflare") || message.contains("Cloudflare") {
|
||||
return SoraError::CloudFlareTimeout(message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user