mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
fix #8807
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:
parent
240b718508
commit
c28920c84f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user