Skip to content

[ BUG ] Missing comma in _payload/_foundry.py causes implicit string concatenation breaking saved search kwargs #1462

@alhumaw

Description

@alhumaw

Describe the bug

The foundry_saved_search_execute_payload function (or similar) in _payload/_foundry.py has a missing comma between "version" and "with_in" in a list literal at lines 103-104. Python silently concatenates adjacent string literals, producing "versionwith_in" as a single key instead of two separate keys. This means neither version nor with_in kwargs work for Foundry LogScale saved search execute operations.

To Reproduce

  1. Create a FoundryLogScale service class instance
  2. Call the saved search execute method passing version or with_in as kwargs:
from falconpy import FoundryLogScale

falcon = FoundryLogScale(client_id="ID", client_secret="SECRET")
result = falcon.execute_saved_search(
    app_id="my-app",
    version="1.0",
    with_in="1d"
)
  1. Neither version nor with_in appear in the request body sent to the API. The kwargs are silently ignored.

The root cause is a missing comma in src/falconpy/_payload/_foundry.py lines 103-104:

# Current (broken) - implicit string concatenation
keys = ["...", "version"
        "with_in", "..."]

# This produces: [..., "versionwith_in", ...]

Expected behavior

Passing version or with_in as keyword arguments should include them in the JSON body sent to the API, consistent with the documented kwargs in the operation docstring.

Environment (please complete the following information):

  • OS: All
  • Python: All supported versions
  • FalconPy: --

Additional context

Workaround: pass a pre-built body dict to bypass the payload builder:

result = falcon.execute_saved_search(body={
    "app_id": "my-app",
    "version": "1.0",
    "with_in": "1d"
})

Fix: add the missing comma in src/falconpy/_payload/_foundry.py line 103:

# Before
keys = ["...", "version"
        "with_in", "..."]
# After
keys = ["...", "version",
        "with_in", "..."]

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions