Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tines connector] Improve error handling and fallback #191263

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

semd
Copy link
Contributor

@semd semd commented Aug 26, 2024

Summary

From: #188115

Improvements of the Tines connector:

  • Original Axios error passed back from getResponseErrorMessage to the sub-actions framework, instead of returning Unknown API error string. The error appears in the error toast so the user has more information about the problem:

Before:
before

After:
after

  • Fallback input (direct webhook URL) now appears when there's some error. Before this change, the fallback input only appeared when the Tines API response was incomplete. Proper callout message added:
Error fallback

@semd semd added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.16.0 v8.15.1 labels Aug 26, 2024
@semd semd self-assigned this Aug 26, 2024
@semd semd requested a review from a team as a code owner August 26, 2024 10:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@semd
Copy link
Contributor Author

semd commented Aug 26, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
stackConnectors 578.5KB 580.3KB +1.8KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @semd

@semd semd added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed v8.15.1 labels Aug 26, 2024
@semd semd enabled auto-merge (squash) August 26, 2024 17:02
Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@semd semd merged commit ffd4076 into elastic:main Aug 27, 2024
23 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 27, 2024
## Summary

From: elastic#188115

Improvements of the Tines connector:

- Original Axios error passed back from `getResponseErrorMessage` to the
sub-actions framework, instead of returning `Unknown API error` string.
The error appears in the error toast so the user has more information
about the problem:

Before:
<img width="975" alt="before"
src="https://github.com/user-attachments/assets/0fdfd085-a4d6-4ebe-b1ae-0f62332b4f5c">

After:
<img width="975" alt="after"
src="https://github.com/user-attachments/assets/1019c8ce-c97c-4564-8ec0-eca303706cfa">

- Fallback input (direct webhook URL) now appears when there's some
error. Before this change, the fallback input only appeared when the
Tines API response was incomplete. Proper callout message added:

<img width="975" alt="Error fallback"
src="https://github.com/user-attachments/assets/b8f46df5-5dfe-42cb-88cc-f10e12a07e25">

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit ffd4076)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 27, 2024
#191491)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Tines connector] Improve error handling and fallback
(#191263)](#191263)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2024-08-27T12:10:48Z","message":"[Tines
connector] Improve error handling and fallback (#191263)\n\n##
Summary\r\n\r\nFrom:
https://github.com/elastic/kibana/issues/188115\r\n\r\nImprovements of
the Tines connector:\r\n\r\n- Original Axios error passed back from
`getResponseErrorMessage` to the\r\nsub-actions framework, instead of
returning `Unknown API error` string.\r\nThe error appears in the error
toast so the user has more information\r\nabout the
problem:\r\n\r\nBefore:\r\n<img width=\"975\"
alt=\"before\"\r\nsrc=\"https://github.com/user-attachments/assets/0fdfd085-a4d6-4ebe-b1ae-0f62332b4f5c\">\r\n\r\nAfter:\r\n<img
width=\"975\"
alt=\"after\"\r\nsrc=\"https://github.com/user-attachments/assets/1019c8ce-c97c-4564-8ec0-eca303706cfa\">\r\n\r\n\r\n-
Fallback input (direct webhook URL) now appears when there's
some\r\nerror. Before this change, the fallback input only appeared when
the\r\nTines API response was incomplete. Proper callout message
added:\r\n\r\n<img width=\"975\" alt=\"Error
fallback\"\r\nsrc=\"https://github.com/user-attachments/assets/b8f46df5-5dfe-42cb-88cc-f10e12a07e25\">\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"ffd4076538cdd41c41651a09e11fb3eef8144b85","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:
SecuritySolution","backport:prev-minor","v8.16.0"],"title":"[Tines
connector] Improve error handling and
fallback","number":191263,"url":"https://github.com/elastic/kibana/pull/191263","mergeCommit":{"message":"[Tines
connector] Improve error handling and fallback (#191263)\n\n##
Summary\r\n\r\nFrom:
https://github.com/elastic/kibana/issues/188115\r\n\r\nImprovements of
the Tines connector:\r\n\r\n- Original Axios error passed back from
`getResponseErrorMessage` to the\r\nsub-actions framework, instead of
returning `Unknown API error` string.\r\nThe error appears in the error
toast so the user has more information\r\nabout the
problem:\r\n\r\nBefore:\r\n<img width=\"975\"
alt=\"before\"\r\nsrc=\"https://github.com/user-attachments/assets/0fdfd085-a4d6-4ebe-b1ae-0f62332b4f5c\">\r\n\r\nAfter:\r\n<img
width=\"975\"
alt=\"after\"\r\nsrc=\"https://github.com/user-attachments/assets/1019c8ce-c97c-4564-8ec0-eca303706cfa\">\r\n\r\n\r\n-
Fallback input (direct webhook URL) now appears when there's
some\r\nerror. Before this change, the fallback input only appeared when
the\r\nTines API response was incomplete. Proper callout message
added:\r\n\r\n<img width=\"975\" alt=\"Error
fallback\"\r\nsrc=\"https://github.com/user-attachments/assets/b8f46df5-5dfe-42cb-88cc-f10e12a07e25\">\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"ffd4076538cdd41c41651a09e11fb3eef8144b85"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191263","number":191263,"mergeCommit":{"message":"[Tines
connector] Improve error handling and fallback (#191263)\n\n##
Summary\r\n\r\nFrom:
https://github.com/elastic/kibana/issues/188115\r\n\r\nImprovements of
the Tines connector:\r\n\r\n- Original Axios error passed back from
`getResponseErrorMessage` to the\r\nsub-actions framework, instead of
returning `Unknown API error` string.\r\nThe error appears in the error
toast so the user has more information\r\nabout the
problem:\r\n\r\nBefore:\r\n<img width=\"975\"
alt=\"before\"\r\nsrc=\"https://github.com/user-attachments/assets/0fdfd085-a4d6-4ebe-b1ae-0f62332b4f5c\">\r\n\r\nAfter:\r\n<img
width=\"975\"
alt=\"after\"\r\nsrc=\"https://github.com/user-attachments/assets/1019c8ce-c97c-4564-8ec0-eca303706cfa\">\r\n\r\n\r\n-
Fallback input (direct webhook URL) now appears when there's
some\r\nerror. Before this change, the fallback input only appeared when
the\r\nTines API response was incomplete. Proper callout message
added:\r\n\r\n<img width=\"975\" alt=\"Error
fallback\"\r\nsrc=\"https://github.com/user-attachments/assets/b8f46df5-5dfe-42cb-88cc-f10e12a07e25\">\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"ffd4076538cdd41c41651a09e11fb3eef8144b85"}}]}]
BACKPORT-->

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:enhancement Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.15.1 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants