Skip to content

[BUG] Code node output always contains an error field, even when execution is successful #3628

@breilian

Description

@breilian

Description

When executing a code node, the output consistently includes an error field, even if the node executes successfully and the entire pipeline passes. This behavior is misleading and may cause unnecessary confusion during debugging or monitoring.

Preconditions

  • Environment: DEV
  • The pipeline contains a code node with structured output enabled.

Steps to Reproduce

  1. Deploy the following pipeline YAML to the DEV environment:
    state:
      some_data:
        type: str
        value: ''
    entry_point: error_test
    nodes:
      - id: error_test
        type: code
        code:
          type: fixed
          value: '{"some_data": "any value from code node"}'
        output:
          - some_data
        structured_output: true
        transition: END
  2. Execute the pipeline.
  3. Observe the output of the error_test node.

Test Data

  • Pipeline YAML: Provided above.
  • Environment: DEV

Actual Result

The output of the code node includes an error field with the following content:

{
  "result": {"some_data": "any value from code node"},
  "error": "/lib/python3.13/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.5.0) or chardet (6.0.0.post1)/charset_normalizer (3.4.3) doesn't match a supported version!  warnings.warn(",
  "execution_info": "Execution time: 6.06s, Packages: chardet, requests"
}

Expected Result

The output of the code node should not include an error field if the node executes successfully. The expected output is:

{
  "result": {"some_data": "any value from code node"},
  "execution_info": "Execution time: 6.06s, Packages: chardet, requests"
}

Attachments

  • N/A

Notes

  • The error field appears to be populated by a warning from the requests library, specifically a RequestsDependencyWarning about mismatched versions of urllib3 and chardet/charset_normalizer.
  • This issue may be related to the Pyodide sandbox environment or the alita_client injection process.

Labels

  • feat:toolkits
  • eng:sdk
  • foundbyautomation

Metadata

Metadata

Labels

eng:sdkSDK engineering work (services, logic, persistence).feat:toolkitsToolkits feature: tool definitions, toolkit management, tool execution/runtime.foundbyautomation

Type

Projects

Status

Bugs

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions