mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-24 22:39:26 +01:00
getCredentials: improved error message
This commit is contained in:
@@ -35,8 +35,9 @@ module.exports = {
|
||||
const error = _get(response, 'error', false);
|
||||
|
||||
if (error) {
|
||||
throw new Error(`Error ${error}: ${response.msg}`);
|
||||
throw new Error(`[${error}] ${response.msg}`);
|
||||
}
|
||||
|
||||
this.apiKey = _get(response, 'data.user.apikey', '');
|
||||
this.at = _get(response, 'data.at', '');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user