Skip to content

Better conditional error messages #5593

@andrewvc

Description

@andrewvc

Currently, if a logstash config contains a boolean expression like if [foo] > 2 and [foo] is of the wrong type or nil it will raise exceptions that can be confusing. We should do the following:

  1. Wrap all conditionals in a begin; end block, and re-raise the exception as a wrapped LogStash::Pipeline::ConditionalError. This can be caught be the code in Add pipeline.continue_on_error setting to allow logstash to rescue arbitrary… #5562
  2. Print out a friendlier error message like: "Your expression [foo] > 2 failed, probably because a field was null. The exact error wash ‘undefined method `>' for true:TrueClass".

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions