@@ -87,7 +87,7 @@ type PasswordAuthenticator struct {
8787
8888func (p PasswordAuthenticator ) Challenge (req []byte ) ([]byte , Authenticator , error ) {
8989 if ! approve (string (req ), p .AllowedAuthenticators ) {
90- return nil , nil , fmt .Errorf ("unexpected authenticator %q" , req )
90+ return nil , nil , fmt .Errorf ("gocql: unexpected authenticator %q" , req )
9191 }
9292 resp := make ([]byte , 2 + len (p .Username )+ len (p .Password ))
9393 resp [0 ] = 0
@@ -459,7 +459,7 @@ func (s *startupCoordinator) startup(ctx context.Context, supported map[string][
459459
460460func (s * startupCoordinator ) authenticateHandshake (ctx context.Context , authFrame * authenticateFrame , startupCompleted * atomic.Bool ) error {
461461 if s .conn .auth == nil {
462- return fmt .Errorf ("authentication required (using %q)" , authFrame .class )
462+ return fmt .Errorf ("gocql: authentication required (using %q)" , authFrame .class )
463463 }
464464
465465 resp , challenger , err := s .conn .auth .Challenge ([]byte (authFrame .class ))
@@ -492,7 +492,7 @@ func (s *startupCoordinator) authenticateHandshake(ctx context.Context, authFram
492492 data : resp ,
493493 }
494494 default :
495- return fmt .Errorf ("unknown frame response during authentication: %v" , v )
495+ return fmt .Errorf ("gocql: unknown frame response during authentication: %v" , v )
496496 }
497497 }
498498}
@@ -1166,7 +1166,7 @@ func (c *Conn) addCall(call *callReq) error {
11661166 }
11671167 existingCall := c .calls [call .streamID ]
11681168 if existingCall != nil {
1169- return fmt .Errorf ("attempting to use stream already in use: %d -> %d" , call .streamID ,
1169+ return fmt .Errorf ("gocql: attempting to use stream already in use: %d -> %d" , call .streamID ,
11701170 existingCall .streamID )
11711171 }
11721172 c .calls [call .streamID ] = call
@@ -1451,7 +1451,7 @@ func (c *Conn) prepareStatement(ctx context.Context, stmt string, tracer Tracer,
14511451 response : x .respMeta ,
14521452 }
14531453 case error :
1454- flight .err = x
1454+ flight .err = fmt . Errorf ( "cassandra: %w" , x )
14551455 default :
14561456 flight .err = NewErrProtocol ("Unknown type in response to prepare frame: %s" , x )
14571457 }
@@ -1727,7 +1727,7 @@ func (c *Conn) UseKeyspace(keyspace string) error {
17271727 switch x := resp .(type ) {
17281728 case * resultKeyspaceFrame :
17291729 case error :
1730- return x
1730+ return fmt . Errorf ( "cassandra: %w" , x )
17311731 default :
17321732 return NewErrProtocol ("unknown frame in response to USE: %v" , x )
17331733 }
@@ -1845,7 +1845,7 @@ func (c *Conn) executeBatch(ctx context.Context, batch *Batch) *Iter {
18451845
18461846 return iter
18471847 case error :
1848- return & Iter {err : x , framer : framer }
1848+ return & Iter {err : fmt . Errorf ( "cassandra: %w" , x ) , framer : framer }
18491849 default :
18501850 return & Iter {err : NewErrProtocol ("Unknown type in response to batch statement: %s" , x ), framer : framer }
18511851 }
0 commit comments