mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-31 10:07:25 +01:00
makeRequest: improved error message
This commit is contained in:
@@ -46,7 +46,7 @@ module.exports = {
|
||||
|
||||
/** Catch request status code other than 200 */
|
||||
if (!request.ok) {
|
||||
throw new Error(`Error ${request.status}: ${errors[request.status]}`);
|
||||
throw new Error(`[${request.status}] ${errors[request.status]}`);
|
||||
}
|
||||
|
||||
/** Parse API response */
|
||||
|
||||
Reference in New Issue
Block a user