summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/compat/unsupported.go5
-rw-r--r--pkg/api/handlers/utils/errors.go4
2 files changed, 4 insertions, 5 deletions
diff --git a/pkg/api/handlers/compat/unsupported.go b/pkg/api/handlers/compat/unsupported.go
index e5ff266f9..1c518690f 100644
--- a/pkg/api/handlers/compat/unsupported.go
+++ b/pkg/api/handlers/compat/unsupported.go
@@ -4,9 +4,8 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/pkg/domain/entities"
-
"github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v2/pkg/errorhandling"
log "github.com/sirupsen/logrus"
)
@@ -14,5 +13,5 @@ func UnsupportedHandler(w http.ResponseWriter, r *http.Request) {
msg := fmt.Sprintf("Path %s is not supported", r.URL.Path)
log.Infof("Request Failed: %s", msg)
- utils.WriteJSON(w, http.StatusNotFound, entities.ErrorModel{Message: msg})
+ utils.WriteJSON(w, http.StatusNotFound, errorhandling.ErrorModel{Message: msg})
}
diff --git a/pkg/api/handlers/utils/errors.go b/pkg/api/handlers/utils/errors.go
index fc77b8ec0..e2c287c45 100644
--- a/pkg/api/handlers/utils/errors.go
+++ b/pkg/api/handlers/utils/errors.go
@@ -5,7 +5,7 @@ import (
"net/http"
"github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v2/pkg/errorhandling"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)
@@ -24,7 +24,7 @@ var (
func Error(w http.ResponseWriter, apiMessage string, code int, err error) {
// Log detailed message of what happened to machine running podman service
log.Infof("Request Failed(%s): %s", http.StatusText(code), err.Error())
- em := entities.ErrorModel{
+ em := errorhandling.ErrorModel{
Because: (errors.Cause(err)).Error(),
Message: err.Error(),
ResponseCode: code,