t3chnoboy / amazon-product-api

:credit_card: Amazon Product Advertising API client
365 stars 104 forks source link

Support error handling for browsenodelookup #43

Open JonathanJonathanJonathan opened 8 years ago

JonathanJonathanJonathan commented 8 years ago

I was trying to do a browseNodeLookup with incorrect response groups; no error was returned. Added this and also included a error callback for unknown responses.

amazon_client.browseNodeLookup({ browseNodeId: 12345, responseGroup: ['TopSellers', 'Images', 'ItemAttributes', 'OfferSummary'], domain: api_domain }, function(err, products) { if (err) { callback(err, null); } else { return callback(null, products); } });