Closed nfriedly closed 8 years ago
also getting the same issue
@abhibisht89 what version of the Node.js SDK are you on? The fix for this was released over a year ago, and a test was added to prevent regressions. Please update to the latest version of the SDK (npm install watson-developer-cloud@latest --save
) and then either confirm that it's working or open a new ticket with more details if you're still seeing an error.
Also, note that the bug here was that when you supply an invalid API key, it provides the error response in the data argument rather than in the error argument. However, an error is expected if you supply an invalid API key. If you are seeing this message in the error argument, then it is working as expected and you simply need to get a valid API key.
When the visual recognition API is called with an invalid API key, an error is returned:
However, this should be in the error argument, not the results argument for the callback function: