Replaced `RequestHandler` with `generatePass`. Now `generatePass` function returns JSON objects containing the pass stream or, otherwise, the error structure.