getDevices: improved error message

This commit is contained in:
Martín M
2020-10-21 20:12:50 -03:00
parent 996c678204
commit 930cf2878c

View File

@@ -16,7 +16,7 @@ module.exports = {
const thingList = _get(response, 'thingList', false);
if (error) {
return { error, msg: errors[error] };
throw new Error(`[${error}] ${errors[error]}`);
}
if (!thingList) {