mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[ci] More info to test annotation failure logging (#215515)
## Summary While annotating test failures, we're seeing increased amount of errors like this: ``` 2025-03-21 13:52:32 INFO Artifact uploads completed successfully -- | Annotate test failures error Request failed with status code 404 | HTTP Error Response Status 404 | HTTP Error Response Body { message: 'Not Found' } | user command error: exit status 10 ``` It would be nicer to show a bit more from the error to help debugging.
This commit is contained in:
parent
dea190c0ef
commit
7120074ec3
1 changed files with 10 additions and 3 deletions
|
@ -13,10 +13,17 @@ import { TestFailures } from '#pipeline-utils';
|
|||
try {
|
||||
await TestFailures.annotateTestFailures();
|
||||
} catch (ex) {
|
||||
console.error('Annotate test failures error', ex.message);
|
||||
console.error(
|
||||
'Annotate test failures error',
|
||||
ex.message,
|
||||
ex?.stack || 'no stacktrace information'
|
||||
);
|
||||
if (ex.response) {
|
||||
console.error('HTTP Error Response Status', ex.response.status);
|
||||
console.error('HTTP Error Response Body', ex.response.data);
|
||||
const requestUrl = ex.response?.url || ex.response?.config?.url || '';
|
||||
console.error(
|
||||
`HTTP Error ${ex.response.status}/${ex.response.statusText} (${requestUrl})`,
|
||||
ex.response.data
|
||||
);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue