Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
change: add group to GroupResource
Browse files Browse the repository at this point in the history
Signed-off-by: Thorsten Klein <[email protected]>
  • Loading branch information
iwilltry42 committed Aug 21, 2023
1 parent c657bbc commit 879edaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/server/registry/apigroups/acorn/images/detail.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/acorn-io/mink/pkg/stores"
"github.com/acorn-io/mink/pkg/types"
"github.com/acorn-io/mink/pkg/validator"
api "github.com/acorn-io/runtime/pkg/apis/api.acorn.io"
apiv1 "github.com/acorn-io/runtime/pkg/apis/api.acorn.io/v1"
"github.com/acorn-io/runtime/pkg/imagedetails"
"github.com/acorn-io/runtime/pkg/images"
Expand Down Expand Up @@ -88,11 +89,11 @@ func translateRegistryErrors(in error, imageName string) error {
if terr, ok := in.(*transport.Error); ok {
switch terr.StatusCode {
case http.StatusNotFound:
return errors.NewNotFound(schema.GroupResource{Resource: "images"}, imageName)
return errors.NewNotFound(schema.GroupResource{Group: api.Group, Resource: "images"}, imageName)
case http.StatusUnauthorized:
return errors.NewUnauthorized(fmt.Sprintf("pulling image %s: %v", imageName, terr))
case http.StatusForbidden:
return errors.NewForbidden(schema.GroupResource{Resource: "images"}, imageName, terr)
return errors.NewForbidden(schema.GroupResource{Group: api.Group, Resource: "images"}, imageName, terr)
}
}
return in
Expand Down

0 comments on commit 879edaf

Please sign in to comment.