mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-27 05:01:15 -05:00
fix: log error and skip if errors raised by CEL (#1898)
This commit is contained in:
@@ -635,13 +635,15 @@ func (m *sharedRepository) processCELExpressions(ctx context.Context, events []C
|
||||
ast, issues := m.env.Compile(expr)
|
||||
|
||||
if issues != nil {
|
||||
return nil, issues.Err()
|
||||
m.l.Error().Msgf("failed to compile CEL expression: %s", issues.String())
|
||||
continue
|
||||
}
|
||||
|
||||
program, err := m.env.Program(ast)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
m.l.Error().Err(err).Msgf("failed to create CEL program: %s", expr)
|
||||
continue
|
||||
}
|
||||
|
||||
programs[condition.ID] = program
|
||||
|
||||
Reference in New Issue
Block a user