Added full error when no message

This commit is contained in:
Jesús Ángel González 2018-03-22 11:24:40 +01:00
parent 9950ae3adf
commit 84d511be9c

View File

@ -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)
}
}