onRequest handlers should be generators