Error handling & rate limiting