worker: change worker errors to bad request errors
This commit is contained in:
parent
8f9779e232
commit
2f57f0d4b1
@ -17,13 +17,12 @@
|
|||||||
package worker
|
package worker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"github.com/coreos/pkg/capnslog"
|
||||||
|
|
||||||
"github.com/coreos/clair/database"
|
"github.com/coreos/clair/database"
|
||||||
"github.com/coreos/clair/utils"
|
"github.com/coreos/clair/utils"
|
||||||
cerrors "github.com/coreos/clair/utils/errors"
|
cerrors "github.com/coreos/clair/utils/errors"
|
||||||
"github.com/coreos/clair/worker/detectors"
|
"github.com/coreos/clair/worker/detectors"
|
||||||
"github.com/coreos/pkg/capnslog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -40,11 +39,11 @@ var (
|
|||||||
|
|
||||||
// ErrUnsupported is the error that should be raised when an OS or package
|
// ErrUnsupported is the error that should be raised when an OS or package
|
||||||
// manager is not supported.
|
// manager is not supported.
|
||||||
ErrUnsupported = errors.New("worker: OS and/or package manager are not supported")
|
ErrUnsupported = cerrors.NewBadRequestError("worker: OS and/or package manager are not supported")
|
||||||
|
|
||||||
// ErrParentUnknown is the error that should be raised when a parent layer
|
// ErrParentUnknown is the error that should be raised when a parent layer
|
||||||
// has yet to be processed for the current layer.
|
// has yet to be processed for the current layer.
|
||||||
ErrParentUnknown = errors.New("worker: parent layer is unknown, it must be processed first")
|
ErrParentUnknown = cerrors.NewBadRequestError("worker: parent layer is unknown, it must be processed first")
|
||||||
)
|
)
|
||||||
|
|
||||||
// Process detects the Namespace of a layer, the features it adds/removes, and
|
// Process detects the Namespace of a layer, the features it adds/removes, and
|
||||||
|
Loading…
Reference in New Issue
Block a user