diff --git a/magic-nix-cache/src/error.rs b/magic-nix-cache/src/error.rs index 9b99701..07b5fe6 100644 --- a/magic-nix-cache/src/error.rs +++ b/magic-nix-cache/src/error.rs @@ -29,6 +29,10 @@ pub enum Error { impl IntoResponse for Error { fn into_response(self) -> Response { let code = match &self { + Self::Api(gha_cache::api::Error::ApiError { + status: StatusCode::TOO_MANY_REQUESTS, + .. + }) => StatusCode::TOO_MANY_REQUESTS, // HACK: HTTP 418 makes Nix throw a visible error but not retry Self::Api(_) => StatusCode::IM_A_TEAPOT, Self::NotFound => StatusCode::NOT_FOUND,