diff --git a/libbeat/outputs/elasticsearch/client.go b/libbeat/outputs/elasticsearch/client.go index 23042cf4cff..b88a15cda68 100644 --- a/libbeat/outputs/elasticsearch/client.go +++ b/libbeat/outputs/elasticsearch/client.go @@ -331,7 +331,7 @@ func createEventBulkMeta( if id != "" { return eslegclient.BulkDeleteAction{Delete: meta}, nil } else { - return nil, fmt.Errorf("%s %s requires _id", events.FieldMetaOpType, events.OpTypeDelete.String()) + return nil, fmt.Errorf("%s %s requires _id", events.FieldMetaOpType, events.OpTypeDelete) } } if id != "" || version.Major > 7 || (version.Major == 7 && version.Minor >= 5) {