mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
return underlying error with BackendDown{} error (#16738)
This commit is contained in:
parent
4636d3a9c3
commit
9d062b37d7
@ -34,6 +34,7 @@ import (
|
||||
"github.com/minio/minio/internal/hash"
|
||||
"github.com/minio/minio/internal/logger"
|
||||
"github.com/minio/minio/internal/sync/errgroup"
|
||||
xnet "github.com/minio/pkg/net"
|
||||
"github.com/minio/pkg/wildcard"
|
||||
)
|
||||
|
||||
@ -447,7 +448,10 @@ func (c *cacheObjects) GetObjectInfo(ctx context.Context, bucket, object string,
|
||||
return cachedObjInfo, nil
|
||||
}
|
||||
c.cacheStats.incMiss()
|
||||
return ObjectInfo{}, BackendDown{}
|
||||
if xnet.IsNetworkOrHostDown(err, false) {
|
||||
return ObjectInfo{}, BackendDown{Err: err.Error()}
|
||||
}
|
||||
return ObjectInfo{}, err
|
||||
}
|
||||
// Reaching here implies cache miss
|
||||
c.cacheStats.incMiss()
|
||||
|
Loading…
Reference in New Issue
Block a user