m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-08 05:03:49 -05:00

fix: handle 502 gracefully

Fixes #104
This commit is contained in:
Sergio
2025-05-10 20:48:22 +03:00
committed by GitHub
parent 8a5b0555f7
commit 2623f52a20

View File

@@ -69,6 +69,11 @@ impl Client {
self.ctx.logger.warn(&message);
Err(message)
}
} else if status == 502 {
let message = format!("{} {}: The registry is currently unavailabile (returned status code 502).", method, url);
self.ctx.logger.warn(&message);
Err(message)
}
} else if status.as_u16() <= 400 {
Ok(response)
} else {