-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Tines connector] Improve error handling and fallback #191263
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
To update your PR or re-run it, just comment with: cc @semd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
## 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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#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>
Summary
From: #188115
Improvements of the Tines connector:
getResponseErrorMessage
to the sub-actions framework, instead of returningUnknown API error
string. The error appears in the error toast so the user has more information about the problem:Before:
After: