Append error message to internal errors
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
e500586d8f
commit
bac78851e0
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ func (s *apiServer) State(ctx context.Context, r *types.StateRequest) (*types.St
|
|||
func createAPIContainer(c runtime.Container, getPids bool) (*types.Container, error) {
|
||||
processes, err := c.Processes()
|
||||
if err != nil {
|
||||
return nil, grpc.Errorf(codes.Internal, "get processes for container")
|
||||
return nil, grpc.Errorf(codes.Internal, "get processes for container: "+err.Error())
|
||||
}
|
||||
var procs []*types.Process
|
||||
for _, p := range processes {
|
||||
|
@ -148,7 +148,7 @@ func createAPIContainer(c runtime.Container, getPids bool) (*types.Container, er
|
|||
state := c.State()
|
||||
if getPids && (state == runtime.Running || state == runtime.Paused) {
|
||||
if pids, err = c.Pids(); err != nil {
|
||||
return nil, grpc.Errorf(codes.Internal, "get all pids for container")
|
||||
return nil, grpc.Errorf(codes.Internal, "get all pids for container: "+err.Error())
|
||||
}
|
||||
}
|
||||
return &types.Container{
|
||||
|
|
Loading…
Reference in a new issue