Skip to content

Commit

Permalink
worker: change worker errors to bad request errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie committed Feb 24, 2016
1 parent 8f9779e commit 2f57f0d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
package worker

import (
"errors"
"github.com/coreos/pkg/capnslog"

"github.com/coreos/clair/database"
"github.com/coreos/clair/utils"
cerrors "github.com/coreos/clair/utils/errors"
"github.com/coreos/clair/worker/detectors"
"github.com/coreos/pkg/capnslog"
)

const (
Expand All @@ -40,11 +39,11 @@ var (

// ErrUnsupported is the error that should be raised when an OS or package
// 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
// 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
Expand Down

0 comments on commit 2f57f0d

Please sign in to comment.