Skip to content

[ BUG ] Typo "dashbaord_url" in _payload/_aspm.py causes dashboard_url kwarg to be silently ignored #1464

@alhumaw

Description

@alhumaw

Describe the bug

The aspm_node_payload function in _payload/_aspm.py has a typo at line 724: "dashbaord_url" instead of "dashboard_url". This means when users pass dashboard_url= as a keyword argument to ASPM node creation operations, the payload builder never matches it (it's looking for the misspelled version), and the value is silently omitted from the request body.

To Reproduce

  1. Create an ASPM service class instance
  2. Call the node creation method passing dashboard_url as a kwarg:
from falconpy import ASPM

falcon = ASPM(client_id="ID", client_secret="SECRET")
result = falcon.create_node(
    name="my-node",
    dashboard_url="https://grafana.internal/d/my-dashboard"
)
  1. The dashboard_url field does not appear in the request body sent to the API. The kwarg is silently ignored.

The root cause is a typo in src/falconpy/_payload/_aspm.py line 724:

# Current (broken)
keys = ["...", "dashbaord_url", "..."]

# Should be
keys = ["...", "dashboard_url", "..."]

Expected behavior

Passing dashboard_url as a keyword argument should include it in the JSON body sent to the API.

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.create_node(body={
    "name": "my-node",
    "dashboard_url": "https://grafana.internal/d/my-dashboard"
})

Alternatively, users could pass the misspelled kwarg dashbaord_url= which would work but is not documented and relies on the bug persisting.

Fix: correct the typo in src/falconpy/_payload/_aspm.py line 724:

# Before
"dashbaord_url"
# After
"dashboard_url"

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