Cleanup client not found errors.

And fix remove calls to return a notFound error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-09-08 12:04:34 -04:00
parent 63a9ea58eb
commit 81bb9978ab
31 changed files with 86 additions and 263 deletions

View File

@@ -9,5 +9,5 @@ func (cli *Client) SecretRemove(ctx context.Context, id string) error {
}
resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil)
ensureReaderClosed(resp)
return err
return wrapResponseError(err, resp, "secret", id)
}