mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[ci] Handle ci-stats HTTP errors a little better to avoid accidentally printing credentials (#110858)
This commit is contained in:
parent
1f90712c47
commit
b5f69a5aa5
3 changed files with 12 additions and 4 deletions
|
@ -7,11 +7,11 @@ const { BuildkiteClient } = require('kibana-buildkite-library');
|
|||
console.log(status.success ? 'true' : 'false');
|
||||
process.exit(0);
|
||||
} catch (ex) {
|
||||
console.error('Buildkite API Error', ex.message);
|
||||
if (ex.response) {
|
||||
console.error('HTTP Error Response Body', ex.response.data);
|
||||
console.error('HTTP Error Response Status', ex.response.status);
|
||||
console.error('HTTP Error Response Body', ex.response.data);
|
||||
}
|
||||
console.error(ex);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -4,7 +4,11 @@ const { CiStats } = require('kibana-buildkite-library');
|
|||
try {
|
||||
await CiStats.onComplete();
|
||||
} catch (ex) {
|
||||
console.error(ex);
|
||||
console.error('CI Stats Error', ex.message);
|
||||
if (ex.response) {
|
||||
console.error('HTTP Error Response Status', ex.response.status);
|
||||
console.error('HTTP Error Response Body', ex.response.data);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -4,7 +4,11 @@ const { CiStats } = require('kibana-buildkite-library');
|
|||
try {
|
||||
await CiStats.onStart();
|
||||
} catch (ex) {
|
||||
console.error(ex);
|
||||
console.error('CI Stats Error', ex.message);
|
||||
if (ex.response) {
|
||||
console.error('HTTP Error Response Status', ex.response.status);
|
||||
console.error('HTTP Error Response Body', ex.response.data);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue