Comparing version 1.2.0 to 1.2.1
@@ -97,3 +97,3 @@ /*! reddit. See LICENSE.md License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
if (tokenType == null || accessToken == null) { | ||
return reject(new Error(`Cannot obtain token for username ${this.username}. ${body.error}.`)) | ||
return reject(new Error(`Cannot obtain token for username ${this.username}. ${body.error}. ${body.error_description}.`)) | ||
} | ||
@@ -109,7 +109,7 @@ | ||
return reject( | ||
new Error(`Cannot obtain token for username ${this.username}. Did you give ${this.username} access in your Reddit App Preferences? ${body.error}. Status code: ${res.statusCode}`) | ||
new Error(`Cannot obtain token for username ${this.username}. Did you give ${this.username} access in your Reddit App Preferences? ${body.error}. ${body.error_description}. Status code: ${res.statusCode}`) | ||
) | ||
} else { | ||
return reject( | ||
new Error(`Cannot obtain token for username ${this.username}. ${body.error}. Status code: ${res.statusCode}`) | ||
new Error(`Cannot obtain token for username ${this.username}. ${body.error}. ${body.error_description}. Status code: ${res.statusCode}`) | ||
) | ||
@@ -116,0 +116,0 @@ } |
{ | ||
"name": "reddit", | ||
"description": "Simple Reddit API client", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh", |
12513