Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

We've reached limit, what now? #265

Closed
kpodemski opened this issue Jun 28, 2016 · 7 comments
Closed

We've reached limit, what now? #265

kpodemski opened this issue Jun 28, 2016 · 7 comments
Assignees
Labels

Comments

@kpodemski
Copy link

It will be good to document scenario where we've reached the limit of requests per day.

Could we receive some message about it? make sure that this will not throw some nasty runtime errors.

@vvo
Copy link
Contributor

vvo commented Jun 28, 2016

I will push an update that will display a nice message in console, would that be sufficient?

@vvo vvo added the bug label Jun 28, 2016
@vvo vvo self-assigned this Jun 28, 2016
@kpodemski
Copy link
Author

kpodemski commented Jun 28, 2016

Can we add something like places.on('limit')? :) If so it can for example disable integration via ajax request or something like that, i think it will be a nice addition, but of course most important is to not break anything if limit is reached

@vvo
Copy link
Contributor

vvo commented Jun 28, 2016

Yes good idea, it will break somehow because we won't be able to show results anymore.

@kpodemski
Copy link
Author

Nice, i'm looking forward to see this in action!

vvo pushed a commit that referenced this issue Jun 28, 2016
@vvo
Copy link
Contributor

vvo commented Jun 28, 2016

I have pushed #267 to fix this. When you reach the rate limit:

  • if you are listening to the limit event: you will receive that event with {message}
  • if you are not listening to the limit event, we will console.log(message)
  • message being:
Algolia Places: Current rate limit reached.

Sign up for a free 100,000 queries/month account at
https://www.algolia.com/users/sign_up/places.

Or upgrade your 100,000 queries/month plan by contacting us:
https://community.algolia.com/places/contact.html.

What do you think?

@kpodemski
Copy link
Author

Nice, i think this is it 👍

@vvo
Copy link
Contributor

vvo commented Jun 28, 2016

Let's go then :)

@vvo vvo closed this as completed in 4de866d Jun 28, 2016
vvo pushed a commit that referenced this issue Jun 28, 2016
## [1.2.1](v1.2.0...v1.2.1) (2016-06-28)

### Bug Fixes

* **limit:** add `limit` and `error` events (#267) ([4de866d](4de866d)), closes [#265](#265)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants