mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 18:05:20 +00:00
Added meaningful message when fetching API fails
This commit is contained in:
parent
aa85d707c7
commit
d7dc14a4cf
@ -212,14 +212,17 @@ export class Monitoring {
|
||||
if (!response.error && ((response.body || {}).data || {}).totalItems) {
|
||||
await this.checkStatus(api, response.body.data.totalItems);
|
||||
} else {
|
||||
const msg = ((response || {}).body || {}).message || false;
|
||||
!this.quiet &&
|
||||
log(
|
||||
'[monitoring][checkAndSaveStatus]',
|
||||
msg ||
|
||||
'Wazuh API credentials not found or are not correct. Open the app in your browser and configure it to start monitoring agents.'
|
||||
);
|
||||
!this.quiet &&
|
||||
this.server.log(
|
||||
[blueWazuh, 'monitoring', 'error'],
|
||||
msg ||
|
||||
'Wazuh API credentials not found or are not correct. Open the app in your browser and configure it to start monitoring agents.'
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user