Skip to content

Commit c91a800

Browse files
authored
[fix][TableView] Correct argument order to Errorf in TableView message handling(#1130)
### Motivation When TableView fails to read a message with the schema the error message is malformed, e.g. ``` ERRO[0000] msg.GetSchemaValue() failed with %!w(*pulsar.message=&{[..snipped..]}); msg is schema not found for topic: [..snipped..], schema version : [ [0 0 0 0 0 0 0 0] ] ``` The correct formatting will help users to debug their issues. ### Modifications Switch error args to match the formatting directives and context of the message. Signed-off-by: Oliver Muir <[email protected]> Co-authored-by: Oliver Muir <[email protected]>
1 parent f42fdde commit c91a800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pulsar/table_view_impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (tv *TableViewImpl) handleMessage(msg Message) {
251251
} else {
252252
payload = reflect.Indirect(reflect.New(tv.options.SchemaValueType)).Interface()
253253
if err := msg.GetSchemaValue(&payload); err != nil {
254-
tv.logger.Errorf("msg.GetSchemaValue() failed with %w; msg is %v", msg, err)
254+
tv.logger.Errorf("msg.GetSchemaValue() failed with %w; msg is %v", err, msg)
255255
}
256256
tv.data[msg.Key()] = payload
257257
}

0 commit comments

Comments
 (0)