Fix error when canceling update (#2254)
* Fix error when canceling update * Update error message
This commit is contained in:
parent
95db6439f5
commit
55bea65276
|
@ -822,6 +822,10 @@ func (b *cloudBackend) CancelCurrentUpdate(ctx context.Context, stackRef backend
|
|||
return err
|
||||
}
|
||||
|
||||
if stack.ActiveUpdate == "" {
|
||||
return errors.Errorf("stack %v has never been updated", stackRef)
|
||||
}
|
||||
|
||||
// Compute the update identifier and attempt to cancel the update.
|
||||
//
|
||||
// NOTE: the update kind is not relevant; the same endpoint will work for updates of all kinds.
|
||||
|
|
|
@ -34,11 +34,11 @@ type UpdateResult string
|
|||
|
||||
const (
|
||||
// InProgressResult is for updates that have not yet completed.
|
||||
InProgressResult = "in-progress"
|
||||
InProgressResult UpdateResult = "in-progress"
|
||||
// SucceededResult is for updates that completed successfully.
|
||||
SucceededResult UpdateResult = "succeeded"
|
||||
// FailedResult is for updates that have failed.
|
||||
FailedResult = "failed"
|
||||
FailedResult UpdateResult = "failed"
|
||||
)
|
||||
|
||||
// Keys we use for values put into UpdateInfo.Environment.
|
||||
|
|
Loading…
Reference in a new issue