We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1556092 commit 266e7bfCopy full SHA for 266e7bf
lib/requestwrapper.js
@@ -68,7 +68,7 @@ function formatErrorIfExists(cb) {
68
}
69
70
// If we have a response and it contains an error
71
- if (body && (body.error || body.error_code)) {
+ if (typeof body === 'object' && (body.error || body.error_code)) {
72
// visual recognition sets body.error to a json object with code/description/error_id instead of putting them top-left
73
if (typeof body.error === 'object' && body.error.description) {
74
const errObj = body.error; // just in case there's a body.error.error...
0 commit comments