changed throw to emitter for a bearer token error