paoloelefante commented on code in PR #1936:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1936#discussion_r2965591090
##########
frame.go:
##########
@@ -759,10 +759,26 @@ func (f *framer) parseErrorFrame() (frame, error) {
return nil, err
}
return res, nil
- case ErrCodeInvalid, ErrCodeBootstrapping, ErrCodeConfig,
ErrCodeCredentials, ErrCodeOverloaded,
- ErrCodeProtocol, ErrCodeServer, ErrCodeSyntax, ErrCodeTruncate,
ErrCodeUnauthorized:
- // TODO(zariel): we should have some distinct types for these
errors
- return errD, nil
+ case ErrCodeOverloaded:
+ return &RequestErrOverloaded{errorFrame: errD}, nil
+ case ErrCodeBootstrapping:
+ return &RequestErrBootstrapping{errorFrame: errD}, nil
+ case ErrCodeInvalid:
+ return &RequestErrInvalid{errorFrame: errD}, nil
+ case ErrCodeConfig:
+ return &RequestErrConfig{errorFrame: errD}, nil
+ case ErrCodeCredentials:
+ return &RequestErrCredentials{errorFrame: errD}, nil
+ case ErrCodeProtocol:
+ return &RequestErrProtocol{errorFrame: errD}, nil
+ case ErrCodeServer:
+ return &RequestErrServer{errorFrame: errD}, nil
+ case ErrCodeSyntax:
+ return &RequestErrSyntax{errorFrame: errD}, nil
+ case ErrCodeTruncate:
+ return &RequestErrTruncate{errorFrame: errD}, nil
+ case ErrCodeUnauthorized:
+ return &RequestErrUnauthorized{errorFrame: errD}, nil
Review Comment:
Fixed. Removed RequestErrServer and RequestErrProtocol to preserve the
existing protocol negotiation behavior. The remaining eight types are intact. I
added the reviewes in the commit message. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]