Skip to content

Commit 4a812cf

Browse files
committed
throw Error --> reject()
1 parent 6cf0f23 commit 4a812cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function SpotifyWebHelper(opts) {
147147
})
148148
.then(function (res) {
149149
if (res.error) {
150-
throw new Error(res.error.message);
150+
reject(new Error(res.error.message));
151151
} else {
152152
resolve(res.token);
153153
}

0 commit comments

Comments
 (0)