- 
                Notifications
    
You must be signed in to change notification settings  - Fork 104
 
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report
YDB GO SDK version:
v3.118.0
Environment
All environments
Current behavior:
When the context passed to ydb.Open has its deadline exceeded, an error message is displayed that is difficult to understand. This makes it challenging to diagnose and resolve the issue.
Expected behavior:
Error something like: context deadline exceeded at Open(driver.go:XXX)
Steps to reproduce:
- Create a context with a deadline that has already been exceeded.
 - Pass this context to the ydb.Open function.
 - Observe the error message that is returned.
 
func TestOpen(t *testing.T) {
	ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond)
	defer cancel()
	time.Sleep(10 * time.Nanosecond)
	_, err := ydb.Open(ctx, "grpc://localhost:2136/local")
	require.NoError(t, err)
}Error:          Received unexpected error:
                                retry failed on attempt No.1: context deadline exceeded at `github.com/ydb-platform/ydb-go-sdk/v3/retry.RetryWithResult(retry.go:337)` at `github.com/ydb-platform/ydb-go-sdk/v3/retry.Retry(retry.go:270)` at `github.com/ydb-platform/ydb-go-sdk/v3/internal/balancer.New(balancer.go:322)` at `github.com/ydb-platform/ydb-go-sdk/v3.(*Driver).connect(driver.go:458)` at `github.com/ydb-platform/ydb-go-sdk/v3.Open(driver.go:314)`
Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working