@@ -702,8 +702,6 @@ func GetErrorClass(ctx context.Context, err error) (ErrorClass, ErrorInfo) {
702702 chproto .ErrUnfinished ,
703703 chproto .ErrAborted :
704704 return ErrorInternalClickHouse , chErrorInfo
705- case chproto .ErrAuthenticationFailed :
706- return ErrorRetryRecoverable , chErrorInfo
707705 case chproto .ErrTooManySimultaneousQueries :
708706 return ErrorIgnoreConnTemporary , chErrorInfo
709707 case chproto .ErrCannotParseUUID , chproto .ErrValueIsOutOfRangeOfDataType : // https://github.com/ClickHouse/ClickHouse/pull/78540
@@ -723,8 +721,6 @@ func GetErrorClass(ctx context.Context, err error) (ErrorClass, ErrorInfo) {
723721 if strings .HasSuffix (chException .Message , "is either DETACHED PERMANENTLY or was just created by another replica" ) {
724722 return ErrorRetryRecoverable , chErrorInfo
725723 }
726- case 439 : // CANNOT_SCHEDULE_TASK
727- return ErrorRetryRecoverable , chErrorInfo
728724 case chproto .ErrUnsupportedMethod ,
729725 chproto .ErrIllegalColumn ,
730726 chproto .ErrDuplicateColumn ,
@@ -741,23 +737,26 @@ func GetErrorClass(ctx context.Context, err error) (ErrorClass, ErrorInfo) {
741737 chproto .ErrNotAnAggregate ,
742738 chproto .ErrSizesOfArraysDoesntMatch ,
743739 chproto .ErrAliasRequired ,
744- 691 , // UNKNOWN_ELEMENT_OF_ENUM
740+ chproto . ErrUnknownElementOfEnum ,
745741 chproto .ErrNoCommonType ,
746742 chproto .ErrIllegalTypeOfArgument :
747743 var qrepSyncError * exceptions.QRepSyncError
748744 if errors .As (err , & qrepSyncError ) {
749745 // could cause false positives, but should be rare
750746 return ErrorNotifyMVOrView , chErrorInfo
751747 }
752- case 529 : // NOT_A_LEADER
748+ case chproto . ErrNotALeader :
753749 if strings .HasPrefix (chException .Message , "Cannot enqueue query on this replica, because it has replication lag" ) {
754750 return ErrorNotifyConnectivity , chErrorInfo
755751 }
756- case chproto .ErrQueryWasCancelled ,
752+ case chproto .ErrAuthenticationFailed ,
753+ chproto .ErrCannotScheduleTask ,
754+ chproto .ErrQueryWasCancelled ,
757755 chproto .ErrPocoException ,
758756 chproto .ErrCannotReadFromSocket ,
759757 chproto .ErrSocketTimeout ,
760- 517 : // CANNOT_ASSIGN_ALTER
758+ chproto .ErrTableIsReadOnly ,
759+ chproto .ErrCannotAssignAlter :
761760 return ErrorRetryRecoverable , chErrorInfo
762761 case chproto .ErrTimeoutExceeded :
763762 if strings .HasSuffix (chException .Message , "distributed_ddl_task_timeout" ) {
0 commit comments