mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-24 07:50:40 -04:00
api: use correct error types in versions/cli (#1867)
Imported wrong error types during refactoring.
This commit is contained in:
parent
6bda62d397
commit
315b6c2f01
6 changed files with 12 additions and 14 deletions
|
@ -24,7 +24,7 @@ import (
|
|||
awsconfig "github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ec2"
|
||||
"github.com/aws/smithy-go"
|
||||
apifetcher "github.com/edgelesssys/constellation/v2/internal/api/fetcher"
|
||||
apiclient "github.com/edgelesssys/constellation/v2/internal/api/client"
|
||||
versionsapi "github.com/edgelesssys/constellation/v2/internal/api/versions"
|
||||
verclient "github.com/edgelesssys/constellation/v2/internal/api/versions/client"
|
||||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||
|
@ -158,7 +158,7 @@ func deleteRef(ctx context.Context, clients rmImageClients, ref string, dryrun b
|
|||
log.Infof("Listing versions of stream %s", stream)
|
||||
|
||||
minorVersions, err := listMinorVersions(ctx, clients.version, ref, stream)
|
||||
var notFoundErr *apifetcher.NotFoundError
|
||||
var notFoundErr *apiclient.NotFoundError
|
||||
if errors.As(err, ¬FoundErr) {
|
||||
log.Debugf("No minor versions found for stream %s", stream)
|
||||
continue
|
||||
|
@ -203,7 +203,7 @@ func deleteImage(ctx context.Context, clients rmImageClients, ver versionsapi.Ve
|
|||
Version: ver.Version,
|
||||
}
|
||||
imageInfo, err := clients.version.FetchImageInfo(ctx, imageInfo)
|
||||
var notFound *apifetcher.NotFoundError
|
||||
var notFound *apiclient.NotFoundError
|
||||
if errors.As(err, ¬Found) {
|
||||
log.Warnf("Image info for %s not found", ver.Version)
|
||||
log.Warnf("Skipping image deletion")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue