Skip to content

Commit fbf0bbe

Browse files
authoredMar 4, 2024
Merge pull request #35 from Kiskae/pass-through-429
Pass through HTTP 429 to the nix daemon
2 parents f7e335a + 606006b commit fbf0bbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎magic-nix-cache/src/error.rs

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ pub enum Error {
2929
impl IntoResponse for Error {
3030
fn into_response(self) -> Response {
3131
let code = match &self {
32+
Self::Api(gha_cache::api::Error::ApiError {
33+
status: StatusCode::TOO_MANY_REQUESTS,
34+
..
35+
}) => StatusCode::TOO_MANY_REQUESTS,
3236
// HACK: HTTP 418 makes Nix throw a visible error but not retry
3337
Self::Api(_) => StatusCode::IM_A_TEAPOT,
3438
Self::NotFound => StatusCode::NOT_FOUND,

0 commit comments

Comments
 (0)