Skip to content

Fix update_incident_status command failing on empty API response - #45522

Open
cengugr wants to merge 1 commit into
demisto:contrib/integrationThreatmon_Ugur-K/fix-update-incident-status-empty-response-1from
integrationThreatmon:Ugur-K/fix-update-incident-status-empty-response
Open

Fix update_incident_status command failing on empty API response#45522
cengugr wants to merge 1 commit into
demisto:contrib/integrationThreatmon_Ugur-K/fix-update-incident-status-empty-response-1from
integrationThreatmon:Ugur-K/fix-update-incident-status-empty-response

Conversation

@cengugr

@cengugr cengugr commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixed the threatmon_update_incident_status command that was failing with Failed to parse json object from response: b'' error.
  • The /incident/status API endpoint returns 200 OK with an empty body on success. The set_status client method was using the default resp_type="json", causing _http_request to fail when parsing the empty response as JSON.
  • Changed set_status to use resp_type="response" and updated change_incident_status to check response.ok instead of truthy JSON content.

Changes

  • ThreatMon.py: Added resp_type="response" to set_status() method, refactored change_incident_status() to handle raw response
  • pack_metadata.json: Version bump 1.0.51.0.6
  • ReleaseNotes/1_0_6.md: Added release note for the fix

Test plan

  • Run !threatmon_update_incident_status alarmId="18618355" status="Resolved" in XSOAR and verify it succeeds without JSON parse errors
  • Verify error handling works correctly when API returns non-200 status codes (403, 500)
    relates: link to the issue

@content-bot content-bot added Contribution Thank you! Contributions are always welcome! External PR Community Support Level Indicates that the contribution is for Community supported pack labels Aug 14, 2026
@content-bot
content-bot changed the base branch from master to contrib/integrationThreatmon_Ugur-K/fix-update-incident-status-empty-response-1 August 14, 2026 11:49
@content-bot
content-bot requested a review from kamalq97 August 14, 2026 11:49
@content-bot

Copy link
Copy Markdown
Contributor

Thank you for your contribution. Your generosity and caring are unrivaled! Make sure to register your contribution by filling the Contribution Registration form, so our content wizard @kamalq97 will know the proposed changes are ready to be reviewed.
For your convenience, here is a link to the contributions SLAs document.

@content-bot

Copy link
Copy Markdown
Contributor

Hi @cengugr, thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution please follow this link.

@content-bot

Copy link
Copy Markdown
Contributor

🤖 AI-Powered Code Review Available

Hi @kamalq97, you can leverage AI-powered code review to assist with this PR!

Available Commands:

  • @marketplace-ai-reviewer start review - Initiate a full AI code review
  • @marketplace-ai-reviewer re-review - Incremental review for new commits

@content-bot content-bot added Community Contribution Form Filled Whether contribution form filled or not. labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Support Level Indicates that the contribution is for Community supported pack Community Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! External PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants