Merge branch 'main' into flakehub-cache

This commit is contained in:
Graham Christensen 2024-03-06 09:38:44 -05:00 committed by GitHub
commit d0115f624f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,10 @@ pub enum Error {
impl IntoResponse for Error { impl IntoResponse for Error {
fn into_response(self) -> Response { fn into_response(self) -> Response {
let code = match &self { 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 // HACK: HTTP 418 makes Nix throw a visible error but not retry
Self::Api(_) => StatusCode::IM_A_TEAPOT, Self::Api(_) => StatusCode::IM_A_TEAPOT,
Self::NotFound => StatusCode::NOT_FOUND, Self::NotFound => StatusCode::NOT_FOUND,