Giter Site home page Giter Site logo

Add detailed error log about benthos HOT 1 OPEN

margamraviteja avatar margamraviteja commented on June 18, 2024
Add detailed error log

from benthos.

Comments (1)

mihaitodor avatar mihaitodor commented on June 18, 2024 1

Simple way to reproduce:

foo.blobl:

map foo {
  root = this.foo | throw("Kaboom!")
}

bar.blobl:

map bar {
  root = this.bar | throw("Kaboom!")
}

benthos.yaml:

input:
  generate:
    count: 2
    mapping: root.map = if count("test") == 1 { "foo" } else { "bar" }
    interval: 0s
  processors:
    - mapping: |
        import "./foo.blobl"
        import "./bar.blobl"
        root = this.apply(this.map)
> benthos -c benthos.yaml
INFO Running main config from specified file       @service=benthos path=benthos.yaml
INFO Listening for HTTP requests at: http://0.0.0.0:4195  @service=benthos
INFO Launching a benthos instance, use CTRL+C to close  @service=benthos
ERRO failed assignment (line 3): failed assignment (line 2): Kaboom!  @service=benthos label="" path=root.input.processors.0
{"map":"foo"}
ERRO failed assignment (line 3): failed assignment (line 2): Kaboom!  @service=benthos label="" path=root.input.processors.0
{"map":"bar"}

Note that the 2 error logs are identical. I think it would help to have apply() inject the map name as an annotation in them.

from benthos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.