Skip to content

Commit

Permalink
fix(error): Improve error message on snapshot creation (#655)
Browse files Browse the repository at this point in the history
# Description

## Checklist
(For exoscale contributors)

* [ ] Changelog updated (under *Unreleased* block)
* [ ] Testing

## Testing

<!--
Describe the tests you did
-->
  • Loading branch information
mlec1 authored Jan 6, 2025
1 parent 25ddea5 commit 40d7a39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/instance_snapshot_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func (c *instanceSnapshotCreateCmd) cmdRun(_ *cobra.Command, _ []string) error {

instance, err := globalstate.EgoscaleClient.FindInstance(ctx, c.Zone, c.Instance)
if err != nil {
if errors.Is(err, exoapi.ErrNotFound) {
return fmt.Errorf("resource not found in zone %q", c.Zone)
}
return err
}

Expand Down

0 comments on commit 40d7a39

Please sign in to comment.