mirror of
https://github.com/containers/podman.git
synced 2025-11-02 06:37:09 +08:00
fix: error reporting for archive endpoint
Returning 500 when copying to read-only destination. Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user