mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
Added full error when no message
This commit is contained in:
parent
9950ae3adf
commit
84d511be9c
@ -378,7 +378,7 @@ module.exports = (server, options) => {
|
||||
const isXpackEnabled = typeof xpack === 'string' && xpack.includes('x-pack');
|
||||
const isSuperUser = isXpackEnabled && req.auth.credentials.roles.includes('superuser');
|
||||
const allowedIndices = isXpackEnabled && !isSuperUser ? await getAllowedIndices(req.auth.credentials.roles) : false;
|
||||
|
||||
|
||||
const data = await elasticRequest
|
||||
.callWithInternalUser('search', {
|
||||
index: '.kibana',
|
||||
@ -419,7 +419,7 @@ module.exports = (server, options) => {
|
||||
throw new Error('The Elasticsearch request didn\'t fetch the expected data');
|
||||
|
||||
} catch(error){
|
||||
return res({error: error.message}).code(500)
|
||||
return res({error: error.message || error}).code(500)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user