Convert errors returned by task service to errdefs error.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-08-17 22:51:55 +00:00
parent 938810e706
commit f79981c2df
3 changed files with 15 additions and 15 deletions

View File

@@ -221,7 +221,7 @@ func (c *container) NewTask(ctx context.Context, ioCreate IOCreation, opts ...Ne
} else {
response, err := c.client.TaskService().Create(ctx, request)
if err != nil {
return nil, err
return nil, errdefs.FromGRPC(err)
}
t.pid = response.Pid
}