germanattanasio / visual-recognition-nodejs

DEPRECATED: this repo is no longer actively maintained
Apache License 2.0
361 stars 351 forks source link

Example App Not working? #1

Closed davidawad closed 9 years ago

davidawad commented 9 years ago

I've cloned the app with my own Watson credentials and It's unfortunately not working.

I keep getting the error :

Error processing the request. Please try again.

The JS console is telling me the server is throwing a 500 error. I've gotten the same error on local and on the web app. 2013 MacBook Air.

germanattanasio commented 9 years ago

It's working for me.

Did you replace url, username and password?

var credentials = extend({
  url: '<url>',
  username: '<username>',
  password: '<password>'
}, bluemix.getServiceCreds('visual_recognition')); // VCAP_SERVICES

url is always: https://gateway.watsonplatform.net/visual-recognition-beta/api

jsstylos commented 9 years ago

This is a common issue -- we should catch it in the wrapper and provide a more useful error message.

germanattanasio commented 9 years ago

The app is not using the wrapper.

jsstylos commented 9 years ago

We should fix that too :-)

germanattanasio commented 9 years ago

Hi @DavidAwad, we have an npm module that you can use to call the services: npmjs.com/package/watson-developer-cloud

germanattanasio commented 9 years ago

@jsstylos The wrapper doesn't required the url and if the credentials are wrong it will say:

{
 code: 401,
 error: 'Unauthorized: Access is denied due to invalid credentials'
}

I agree we need to update this sample, I will open create a task for that