[Cases][Webhook] - Better handle 204 responses#251090
[Cases][Webhook] - Better handle 204 responses#251090michaelolo24 merged 6 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-cases (Team:Cases) |
|
Fixes #251108 |
| const data = res.data; | ||
|
|
||
| // If status is 204 and there is no data, we just return | ||
| if (res.status === 204 && isEmpty(data)) { |
There was a problem hiding this comment.
We could also make sure requiredAttributesToBeInTheResponse is not undefined here.
There was a problem hiding this comment.
Good catch, will update, thanks!
⏳ Build in-progress, with failures
Failed CI StepsHistory
|
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
4 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
3 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Starting backport for target branches: 8.19, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/22456464192 |
## Summary Currently when an update is made to an external connector that returns a `204` no content response, the rest of the incident update fails. This should not occur as a 204 is a valid response Fixes elastic#251108 ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 926e3a2)
## Summary Currently when an update is made to an external connector that returns a `204` no content response, the rest of the incident update fails. This should not occur as a 204 is a valid response Fixes elastic#251108 ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 926e3a2)
## Summary Currently when an update is made to an external connector that returns a `204` no content response, the rest of the incident update fails. This should not occur as a 204 is a valid response Fixes elastic#251108 ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 926e3a2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
3 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `9.2`: - [[Cases][Webhook] - Better handle 204 responses (#251090)](#251090) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Michael Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2026-02-02T22:51:27Z","message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport missing","backport:all-open","backport:version","Team:Cases","v9.3.0","v9.4.0","(do not use) backport:9.2","v9.2.5","(do not use) backport:9.3","v9.3.1"],"title":"[Cases][Webhook] - Better handle 204 responses","number":251090,"url":"https://github.com/elastic/kibana/pull/251090","mergeCommit":{"message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251090","number":251090,"mergeCommit":{"message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co> Co-authored-by: mmahacek <mark.mahacek@elastic.co>
# Backport This will backport the following commits from `main` to `9.3`: - [[Cases][Webhook] - Better handle 204 responses (#251090)](#251090) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Michael Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2026-02-02T22:51:27Z","message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport missing","backport:all-open","backport:version","Team:Cases","v9.3.0","v9.4.0","(do not use) backport:9.2","v9.2.5","(do not use) backport:9.3","v9.3.1"],"title":"[Cases][Webhook] - Better handle 204 responses","number":251090,"url":"https://github.com/elastic/kibana/pull/251090","mergeCommit":{"message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251090","number":251090,"mergeCommit":{"message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co> Co-authored-by: mmahacek <mark.mahacek@elastic.co>
) # Backport This will backport the following commits from `main` to `8.19`: - [[Cases][Webhook] - Better handle 204 responses (#251090)](#251090) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Michael Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2026-02-02T22:51:27Z","message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport missing","backport:all-open","backport:version","Team:Cases","v9.3.0","v9.4.0","(do not use) backport:9.2","v9.2.5","(do not use) backport:9.3","v9.3.1"],"title":"[Cases][Webhook] - Better handle 204 responses","number":251090,"url":"https://github.com/elastic/kibana/pull/251090","mergeCommit":{"message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251090","number":251090,"mergeCommit":{"message":"[Cases][Webhook] - Better handle 204 responses (#251090)\n\n## Summary\n\nCurrently when an update is made to an external connector that returns a\n`204` no content response, the rest of the incident update fails. This\nshould not occur as a 204 is a valid response\n\nFixes https://github.com/elastic/kibana/issues/251108\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"926e3a2ea37ef37f0a2faed96c241a8179901a24"}},{"branch":"9.2","label":"v9.2.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co> Co-authored-by: mmahacek <mark.mahacek@elastic.co>
Summary
Currently when an update is made to an external connector that returns a
204no content response, the rest of the incident update fails. This should not occur as a 204 is a valid responseFixes #251108
Checklist
Check the PR satisfies following conditions.