Commit 8817aabe by AdriVanHoudt

&& not || derp // cleanup

parent 474f1ec9
...@@ -95,7 +95,7 @@ FullContact.prototype.request = function req(packet, args) { ...@@ -95,7 +95,7 @@ FullContact.prototype.request = function req(packet, args) {
// it will have a "message" property when it's a failed request so we can // it will have a "message" property when it's a failed request so we can
// leverage that to return a nice error. // leverage that to return a nice error.
// //
if (body.status !== 200 || body.status !== 202) { if (body.status !== 200 && body.status !== 202) {
err = new Error(body.message); err = new Error(body.message);
err.status = body.status; err.status = body.status;
......
...@@ -32,14 +32,7 @@ describe('FullContact.Person', function () { ...@@ -32,14 +32,7 @@ describe('FullContact.Person', function () {
describe('#email with webhook url/id', function () { describe('#email with webhook url/id', function () {
it('retrieves data by e-mail and sets up a webhook with the right url and id', function (done) { it('retrieves data by e-mail and sets up a webhook with the right url and id', function (done) {
api.person.email('arnout@observe.it', null, 'http://requestb.in/1bxgb751', 'webhookTest', function email(err, data) { api.person.email('arnout@observe.it', null, 'http://requestb.in/1bxgb751', 'webhookTest', done);
if (err) return done(err);
console.log(err);
console.log(data);
done();
});
}); });
it('provides the proper casing'); it('provides the proper casing');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment