Skip to content

Commit a4afe9d

Browse files
committed
simplify additional error attrs
1 parent 1546491 commit a4afe9d

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

flow/alerting/classifier.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,16 +1158,12 @@ func GetErrorClass(ctx context.Context, err error) (ErrorClass, ErrorInfo) {
11581158
}
11591159

11601160
if partialRowEventError, ok := errors.AsType[*exceptions.MySQLUnsupportedPartialRowEventError](err); ok {
1161-
var additionalAttributes map[AdditionalErrorAttributeKey]string
1162-
if partialRowEventError.Schema != "" || partialRowEventError.Table != "" {
1163-
additionalAttributes = map[AdditionalErrorAttributeKey]string{
1164-
ErrorAttributeKeyTable: fmt.Sprintf("%s.%s", partialRowEventError.Schema, partialRowEventError.Table),
1165-
}
1166-
}
11671161
return ErrorNotifyBinlogPartialRowEventUnsupported, ErrorInfo{
1168-
Source: ErrorSourceMySQL,
1169-
Code: "UNSUPPORTED_PARTIAL_ROW_EVENT",
1170-
AdditionalAttributes: additionalAttributes,
1162+
Source: ErrorSourceMySQL,
1163+
Code: "UNSUPPORTED_PARTIAL_ROW_EVENT",
1164+
AdditionalAttributes: map[AdditionalErrorAttributeKey]string{
1165+
ErrorAttributeKeyTable: fmt.Sprintf("%s.%s", partialRowEventError.Schema, partialRowEventError.Table),
1166+
},
11711167
}
11721168
}
11731169

0 commit comments

Comments
 (0)