fix: backend not reachable should be more descriptive (#13634)

This commit is contained in:
Harshavardhana
2021-11-10 22:33:17 -08:00
committed by GitHub
parent 5acc8c0134
commit 68c5ad83fb
4 changed files with 24 additions and 5 deletions

View File

@@ -645,10 +645,12 @@ func (e UnsupportedMetadata) Error() string {
}
// BackendDown is returned for network errors or if the gateway's backend is down.
type BackendDown struct{}
type BackendDown struct {
Err string
}
func (e BackendDown) Error() string {
return "Backend down"
return e.Err
}
// isErrBucketNotFound - Check if error type is BucketNotFound.