Skip to content

fix(go): Fix execute command request payload placement#81

Open
romann-cs wants to merge 1 commit into
mainfrom
fix/handler_patch
Open

fix(go): Fix execute command request payload placement#81
romann-cs wants to merge 1 commit into
mainfrom
fix/handler_patch

Conversation

@romann-cs

Copy link
Copy Markdown
Contributor

Summary

  • Fixed createIncident placing the operation payload in Config (DomainConfigData) instead of Request (DomainRequest). The Config field is for authentication data, while Request carries the actual operation body
    sent to ServiceNow.
  • Added TestExecuteCommandPayloadJSON which validates the full JSON wire format of the execute command request, preventing this class of regression if the SDK struct changes again.

Context

The gofalcon v0.20.0 upgrade (commit 3fab32a) incorrectly moved the request payload from Request to Config due to a struct rename in the regenerated SDK (gofalcon). Both fields accept a JSON interface, so it compiled and
existing tests passed, but the payload was being sent in the wrong field at the API level.

Test plan

go test ./... passes

Verified the new test catches the bug by temporarily reverting to the broken code

@romann-cs romann-cs requested a review from mraible June 12, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants