Infra 272 better rate limit handling

this might be cleaner as two test cases - one to assert that a warning is emitted, one to assert that the error gets logged. that way you don't have to wait for two separate callbacks