add better exception handling

- general handle_exception method
- sleep when encoutnering 429 (rate limit exceeded)