Closed dylandechant closed 7 years ago
HEH. whoops.
Looks like you're missing a bracket?
yessir! i did find something wrong in your docs though in the api reference in my account:
var clearbit = require('clearbit')('=');
clearbit.Company.find({domain: 'uber.com'})
.then(function (company) {
console.log('Name: ', company.name);
})
.catch(Company.QueuedError, function (err) {
// Company lookup queued - try again later
})
.catch(Company.NotFoundError, function (err) {
// Company could not be found
console.log(err);
})
.catch(function (err) {
console.error(err);
});
should be:
var clearbit = require('clearbit')('=');
clearbit.Company.find({domain: 'uber.com'})
.then(function (company) {
console.log('Name: ', company.name);
})
.catch(clearbit.Company.QueuedError, function (err) {
// Company lookup queued - try again later
})
.catch(clearbit.Company.NotFoundError, function (err) {
// Company could not be found
console.log(err);
})
.catch(function (err) {
console.error(err);
});
notice the difference in the catch
statements?
We might need to roll your key 😬. Want to contact support@clearbit.com
haha, yes, realized that a minute after i posted. Thanks!
this code (node 7.10.1):
throws this error:
either the docs are outdated or the package is broken