Format the error of mount blob, return a http error so that the core can parse it.

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-08-30 16:29:44 +08:00
parent 240b718508
commit c28920c84f

View File

@ -272,7 +272,10 @@ func (r *Repository) MountBlob(digest, from string) error {
if err != nil {
return err
}
return fmt.Errorf("status %d, body: %s", resp.StatusCode, string(b))
return &commonhttp.Error{
Code: resp.StatusCode,
Message: string(b),
}
}
return nil