summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-29 12:14:17 +0100
committerGitHub <noreply@github.com>2021-11-29 12:14:17 +0100
commit3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4 (patch)
treed576d39ffba7402562ec40593381d01a4363967f /pkg
parent7324d94648a9987b0de2dc95cf1b6fbc20592532 (diff)
parentcbda62d1be5c13ac96b9fef10bc2eceead909727 (diff)
downloadpodman-3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4.tar.gz
podman-3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4.tar.bz2
podman-3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4.zip
Merge pull request #12431 from matejvasek/fix-ctr-archive-ep
fix: error reporting for archive endpoint
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_archive.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers_archive.go b/pkg/api/handlers/compat/containers_archive.go
index cda23a399..54cbe01e9 100644
--- a/pkg/api/handlers/compat/containers_archive.go
+++ b/pkg/api/handlers/compat/containers_archive.go
@@ -133,8 +133,10 @@ func handlePut(w http.ResponseWriter, r *http.Request, decoder *schema.Decoder,
return
}
- w.WriteHeader(http.StatusOK)
if err := copyFunc(); err != nil {
logrus.Error(err.Error())
+ utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err)
+ return
}
+ w.WriteHeader(http.StatusOK)
}