1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove validationError type, and use errdefs.InvalidParameter

Using `errors.Errorf()` passes the error with the stack trace for
debugging purposes.

Also using `errdefs.InvalidParameter` for Windows, so that the API
will return a 4xx status, instead of a 5xx, and added tests for
both validations.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-12-22 02:28:30 +01:00
parent 342f7a357a
commit 11b88be247
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
4 changed files with 56 additions and 15 deletions

View file

@ -14,9 +14,8 @@ import (
"syscall"
"time"
"github.com/pkg/errors"
"github.com/docker/docker/pkg/mount"
"github.com/pkg/errors"
)
var (