Skip to content

Commit

Permalink
Fix missed log messaging to use the operation package
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewavery committed Oct 30, 2017
1 parent 2f4f96d commit eaba45f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/apiservers/engine/backends/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ func (c *Container) ContainerExecCreate(name string, config *types.ExecConfig) (
if err != nil {
switch err := err.(type) {
case *tasks.InspectInternalServerError:
log.Debugf("received an internal server error during task inspect: %s", err.Payload.Message)
op.Debugf("received an internal server error during task inspect: %s", err.Payload.Message)
return "", InternalServerError(err.Payload.Message)
case *tasks.InspectConflict:
log.Debugf("received a conflict error during task inspect: %s", err.Payload.Message)
op.Debugf("received a conflict error during task inspect: %s", err.Payload.Message)
return "", ConflictError(fmt.Sprintf("Cannot complete the operation, container %s has been powered off during execution", id))
default:
return "", InternalServerError(err.Error())
Expand Down Expand Up @@ -345,10 +345,10 @@ func (c *Container) ContainerExecInspect(eid string) (*backend.ExecInspect, erro
if err != nil {
switch err := err.(type) {
case *tasks.InspectInternalServerError:
log.Debugf("received an internal server error during task inspect: %s", err.Payload.Message)
op.Debugf("received an internal server error during task inspect: %s", err.Payload.Message)
return nil, InternalServerError(err.Payload.Message)
case *tasks.InspectConflict:
log.Debugf("received a conflict error during task inspect: %s", err.Payload.Message)
op.Debugf("received a conflict error during task inspect: %s", err.Payload.Message)
return nil, ConflictError(fmt.Sprintf("Cannot complete the operation, container %s has been powered off during execution", id))
default:
return nil, InternalServerError(err.Error())
Expand Down Expand Up @@ -422,10 +422,10 @@ func (c *Container) ContainerExecStart(ctx context.Context, eid string, stdin io
if err != nil {
switch err := err.(type) {
case *tasks.InspectInternalServerError:
log.Debugf("received an internal server error during task inspect: %s", err.Payload.Message)
op.Debugf("received an internal server error during task inspect: %s", err.Payload.Message)
return InternalServerError(err.Payload.Message)
case *tasks.InspectConflict:
log.Debugf("received a conflict error during task inspect: %s", err.Payload.Message)
op.Debugf("received a conflict error during task inspect: %s", err.Payload.Message)
return ConflictError(fmt.Sprintf("Cannot complete the operation, container %s has been powered off during execution", id))
default:
return InternalServerError(err.Error())
Expand Down

0 comments on commit eaba45f

Please sign in to comment.