mirror of https://github.com/docker/docs.git
Log: improve error logging
When pushing an image to Distribution server with Notary enabled at the first time, client will try to get the root.json and it will fail since there is nothing in Notary yet. This patch enhances the error message by adding the error detail. - "404 GET notary-distribution:5678/busybox:root" Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
parent
3fa73e80b9
commit
5968823ace
|
|
@ -129,7 +129,7 @@ func getHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, var
|
|||
out, err := store.GetCurrent(gun, tufRole)
|
||||
if err != nil {
|
||||
if _, ok := err.(storage.ErrNotFound); ok {
|
||||
logrus.Error("404 GET " + gun + ":" + tufRole)
|
||||
logrus.Errorf("404 GET %s:%s, error: %v", gun, tufRole, err)
|
||||
return errors.ErrMetadataNotFound.WithDetail(nil)
|
||||
}
|
||||
logger.Error("500 GET")
|
||||
|
|
|
|||
Loading…
Reference in New Issue