Skip to content

Commit

Permalink
replaces new Errors with strings
Browse files Browse the repository at this point in the history
  • Loading branch information
HipsterBrown committed Nov 16, 2015
1 parent 3a96d97 commit 180fac8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,15 @@ controller.createAccessPoint = function(opts) {

return new Promise(function(resolve, reject) {
if (!ssid) {
reject(new Error('Invalid credentials. Must set ssid'));
reject('Invalid credentials. Must set ssid');
}

if (security && !password) {
reject(new Error('Invalid credentials. Must set a password with security option'));
reject('Invalid credentials. Must set a password with security option');
}

if (security && securityOptions.indexOf(security) < 0) {
reject(new Error(security + ' is not a valid security option. Please choose on of the following: ' + securityOptions.join(', ')));
reject(security + ' is not a valid security option. Please choose on of the following: ' + securityOptions.join(', '));
}
resolve();
})
Expand Down

0 comments on commit 180fac8

Please sign in to comment.