paoloelefante commented on code in PR #1936:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1936#discussion_r2964280915


##########
frame.go:
##########
@@ -759,7 +759,11 @@ func (f *framer) parseErrorFrame() (frame, error) {
                        return nil, err
                }
                return res, nil
-       case ErrCodeInvalid, ErrCodeBootstrapping, ErrCodeConfig, 
ErrCodeCredentials, ErrCodeOverloaded,
+       case ErrCodeOverloaded:
+               return &RequestErrOverloaded{errorFrame: errD}, nil
+       case ErrCodeBootstrapping:
+               return &RequestErrBootstrapping{errorFrame: errD}, nil
+       case ErrCodeInvalid, ErrCodeConfig, ErrCodeCredentials,
                ErrCodeProtocol, ErrCodeServer, ErrCodeSyntax, ErrCodeTruncate, 
ErrCodeUnauthorized:
                // TODO(zariel): we should have some distinct types for these 
errors

Review Comment:
   Thanks for the feedback.
   Agreed: introducing dedicated types for all currently generic server
   error codes is the right approach, both for consistency and to eliminate
   the TODO that has been there since the original implementation.
   I have extended the PR to cover the remaining codes: ErrCodeInvalid,
   ErrCodeConfig, ErrCodeCredentials, ErrCodeProtocol, ErrCodeServer,
   ErrCodeSyntax, ErrCodeTruncate, ErrCodeUnauthorized.
   The catch-all case and the TODO comment are now removed.



-- 
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]

Reply via email to