Allow for optional handler for rate limiting

Instead of hardcoding a response, allow an application to define its own way of handling rate limits being hit.