Skip to content

Commit

Permalink
fix(server_create): pass down error on bad image label (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Jun 24, 2022
1 parent f971117 commit 364f648
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/namespaces/instance/v1/custom_server_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func instanceServerCreateRun(ctx context.Context, argsI interface{}) (i interfac
CommercialType: serverReq.CommercialType,
})
if err != nil {
return nil, fmt.Errorf("bad image label '%s' for %s", args.Image, serverReq.CommercialType)
return nil, err
}
serverReq.Image = imageID
default:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
🎲🎲🎲 EXIT CODE: 1 🎲🎲🎲
πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️
Bad image label 'macos' for DEV1-S
Scaleway-sdk-go: couldn't find a matching image for the given label (macos), zone (fr-par-1) and commercial type (DEV1-S)
πŸŸ₯πŸŸ₯πŸŸ₯ JSON STDERR πŸŸ₯πŸŸ₯πŸŸ₯
{
"error": "bad image label 'macos' for DEV1-S"
"error": "scaleway-sdk-go: couldn't find a matching image for the given label (macos), zone (fr-par-1) and commercial type (DEV1-S)"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
🎲🎲🎲 EXIT CODE: 1 🎲🎲🎲
πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️
Bad image label 'ubuntu_bionic' for MACBOOK1-S
Scaleway-sdk-go: couldn't find a matching image for the given label (ubuntu_bionic), zone (fr-par-1) and commercial type (MACBOOK1-S): couldn't find compatible local image for this image version (47d38b1a-71a9-4f29-80bc-2dbb7bda7f9f)
πŸŸ₯πŸŸ₯πŸŸ₯ JSON STDERR πŸŸ₯πŸŸ₯πŸŸ₯
{
"error": "bad image label 'ubuntu_bionic' for MACBOOK1-S"
"error": "scaleway-sdk-go: couldn't find a matching image for the given label (ubuntu_bionic), zone (fr-par-1) and commercial type (MACBOOK1-S): couldn't find compatible local image for this image version (47d38b1a-71a9-4f29-80bc-2dbb7bda7f9f)"
}

0 comments on commit 364f648

Please sign in to comment.