diff --git a/pkg/storage/internalstorage/errors.go b/pkg/storage/internalstorage/errors.go index 969f958a4..842514ea7 100644 --- a/pkg/storage/internalstorage/errors.go +++ b/pkg/storage/internalstorage/errors.go @@ -29,7 +29,6 @@ var recoverableErrors = []error{ io.ErrUnexpectedEOF, os.ErrDeadlineExceeded, syscall.ECONNREFUSED, - driver.ErrBadConn, } func init() { @@ -65,6 +64,10 @@ func InterpretDBError(key string, err error) error { return storage.NewRecoverableException(err) } + if errors.Is(err, driver.ErrBadConn) { + return storage.NewRecoverableException(fmt.Errorf("storage error: database connection error: %s", err)) + } + for _, re := range recoverableErrors { if errors.Is(err, re) { return storage.NewRecoverableException(err)