refactor: add err check in create tags
This commit is contained in:
parent
653bf24211
commit
6820806436
|
@ -96,7 +96,12 @@ func (s *StepCreateVolume) Run(ctx context.Context, state multistep.StateBag) mu
|
||||||
|
|
||||||
//Create tags for volume
|
//Create tags for volume
|
||||||
if len(volTags) > 0 {
|
if len(volTags) > 0 {
|
||||||
osccommon.CreateTags(oapiconn, s.volumeId, ui, volTags)
|
if err := osccommon.CreateTags(oapiconn, s.volumeId, ui, volTags); err != nil {
|
||||||
|
err := fmt.Errorf("Error creating tags for volume: %s", err)
|
||||||
|
state.Put("error", err)
|
||||||
|
ui.Error(err.Error())
|
||||||
|
return multistep.ActionHalt
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for the volume to become ready
|
// Wait for the volume to become ready
|
||||||
|
|
Loading…
Reference in New Issue