-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy patherrors.js
26 lines (24 loc) · 967 Bytes
/
errors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const errors = {
400: 'Parameter error',
401: 'Wrong account or password',
402: 'Email inactivated',
403: 'Forbidden',
404: 'Device does not exist',
406: 'Authentication failed',
503: 'Service Temporarily Unavailable or Device is offline',
};
const customErrors = {
ch404: 'Device channel does not exist',
unknown: 'An unknown error occurred',
noARP: 'No ARP information found. You need to generate the ARP file.',
noDevice: 'No device found',
noDevices: 'No devices found',
noPower: 'No power usage data found',
noSensor: "Can't read sensor data from device",
noFirmware: "Can't get model or firmware version",
noFirmwares: "Can't find firmware update information",
invalidAuth: 'Library needs to be initialized using email and password',
invalidCredentials: 'Invalid credentials provided',
invalidPowerState: 'Invalid power state. Expecting: "on", "off" or "toggle"',
};
module.exports = Object.assign(errors, customErrors);