-
Notifications
You must be signed in to change notification settings - Fork 522
checkpoint_harmony_endpoint.forensics: Improve error reporting for API requests #12778
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
checkpoint_harmony_endpoint.forensics: Improve error reporting for API requests #12778
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportTo see the full report comment with |
| "error": { | ||
| "code": string(resp.StatusCode), | ||
| "id": string(resp.Status), | ||
| "message": "POST " + state.url + "/auth/external" + ": " + ( |
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.
| "message": "POST " + state.url + "/auth/external" + ": " + ( | |
| "message": "POST " + state.url.trim_right("/") + "/auth/external: " + ( |
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.
Updated as suggested in 3d5cbff
| "error": { | ||
| "code": string(resp.StatusCode), | ||
| "id": string(resp.Status), | ||
| "message": "POST " + state.url + "/app/laas-logs-api/api/logs_query/retrieve: " + ( |
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.
| "message": "POST " + state.url + "/app/laas-logs-api/api/logs_query/retrieve: " + ( | |
| "message": "POST " + state.url.trim_right("/") + "/app/laas-logs-api/api/logs_query/retrieve: " + ( |
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.
Updated in 3d5cbff
| "error": { | ||
| "code": string(resp.StatusCode), | ||
| "id": string(resp.Status), | ||
| "message": "GET " + state.url + "/app/laas-logs-api/api/logs_query/" + state.cursor.task_id + ": " + ( |
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.
| "message": "GET " + state.url + "/app/laas-logs-api/api/logs_query/" + state.cursor.task_id + ": " + ( | |
| "message": "GET " + state.url.trim_right("/") + "/app/laas-logs-api/api/logs_query/" + state.cursor.task_id + ": " + ( |
When I'm doing this, I don't add any details beyond the endpoint, so, I'd also suggest dropping the " + state.cursor.task_id + " part.
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.
Got it, I also thought of removing it, but the path seemed to be same for above error message, hence preventing us from differentiating between errors.
Now I noticed that the http.method is different GET vs POST.
I will remove the state.cursor.task_id + " part.
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.
Updated in 3d5cbff
💚 Build Succeeded
History
cc @kcreddy |
|
|
Package checkpoint_harmony_endpoint - 0.3.0 containing this change is available at https://epr.elastic.co/package/checkpoint_harmony_endpoint/0.3.0/ |
…I requests (#12778) Improves error reporting for API requests in `checkpoint_harmony_endpoint.forensics` data-stream




Proposed commit message
Note
Better reviewable when
Hide-Whitespaceis selected.Checklist
changelog.ymlfile.How to test this PR locally