Merge pull request #172 from mlaventure/better-error-for-pause-and-resume
Return the runtime error message on failed pause and resume calls
This commit is contained in:
commit
cb3c208a4d
2 changed files with 12 additions and 4 deletions
|
@ -23,7 +23,7 @@ func (s *Supervisor) updateContainer(t *UpdateTask) error {
|
|||
switch t.State {
|
||||
case runtime.Running:
|
||||
if err := container.Resume(); err != nil {
|
||||
return ErrUnknownContainerStatus
|
||||
return err
|
||||
}
|
||||
s.notifySubscribers(Event{
|
||||
ID: t.ID,
|
||||
|
@ -32,7 +32,7 @@ func (s *Supervisor) updateContainer(t *UpdateTask) error {
|
|||
})
|
||||
case runtime.Paused:
|
||||
if err := container.Pause(); err != nil {
|
||||
return ErrUnknownContainerStatus
|
||||
return err
|
||||
}
|
||||
s.notifySubscribers(Event{
|
||||
ID: t.ID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue