Skip to content

Return better error when field is missing #123

@ruflin

Description

@ruflin

When the benchmark command is run in elastic-package and something is off with the field definition, the following error is returned:

Error: error running package stream benchmarks: could not complete benchmark run: error while generating event for streaming: generate called on a field not present in fields yaml definition

This misses the important information about which benchmark, which fields.yml and which field. To make debugging for template creators as easy as possible, all this info should be provided.

The error message for the field can be found here:

var generateOnFieldNotInFieldsYaml = errors.New("generate called on a field not present in fields yaml definition")
and it seems it is triggered, when the channel is closed which can be found here: Unfortunately the info is not passed through the channel or added to the error message.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions