clearbit / clearbit-node

Node library for querying the Clearbit business intelligence APIs
https://clearbit.com/docs
MIT License
69 stars 35 forks source link

queued errors? #13

Closed leebenson closed 8 years ago

leebenson commented 8 years ago

First time Clearbit user, just installed this repo. Made my first request and got a PersonQueuedError: lookup queued.

I tried again 10 seconds later, and the promise was resolved successfully.

Is this a common occurrence? How quickly should I retry if a record is showed as 'queued'? Is there any way to enforce real-time look-ups?

My use case is a REST API that needs to send back data in a single request and not subscribe to changes, so I'm hoping there is a way to limit this behaviour.

Thanks in advance!

maccman commented 8 years ago

@leebenson Yes, that's expected. If you'd rather not poll I recommend either using the webhook API [1], or the stream option [2].

[1] - https://clearbit.com/docs#webhooks [2] - https://clearbit.com/docs#streaming

leebenson commented 8 years ago

thanks @maccman - streaming solves it.