# Error Subscribing To Events In Default Docs

**URL:** <https://forum.flow.com/t/error-subscribing-to-events-in-default-docs/2871>\
**Category:** Flow JavaScript SDK\
**Tags:** flow-sdk-js\
**Created:** [February 26, 2022, 3:48pm UTC](https://forum.flow.com/t/error-subscribing-to-events-in-default-docs/2871 "2022-02-26T15:48:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaw81](https://avatars.discourse-cdn.com/v4/letter/i/35a633/32.png) [@isaw81](https://forum.flow.com/u/isaw81)\
**Post date:** [February 26, 2022, 3:48pm UTC](https://forum.flow.com/t/error-subscribing-to-events-in-default-docs/2871/1 "2022-02-26T15:48:17Z")

</div>

Using the Flow Docs description for how to subscribe to events is simply:

// in some react component  
fcl.events(eventName).subscribe((event) =\> {  
console.log(event)  
})

However all attempts at using this give the error:

Error: invalid query: start block must be \<= end block

Along with a bunch of warnings for the use of the deprecated latestBlock() instead of block().

Am I to assume the events attribute is no longer being supported? How should I poll for my contract events? Continuously calling getEventsAtBlockHeightRange() seems an inconvenient solution. Appreciate any insight!

---

<div class="post-metadata">

**Author:** ![kimcodeashian](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/kimcodeashian/32/498_2.png) [@kimcodeashian](https://forum.flow.com/u/kimcodeashian)\
**Post date:** [March 2, 2022, 11:07pm UTC](https://forum.flow.com/t/error-subscribing-to-events-in-default-docs/2871/2 "2022-03-02T23:07:04Z")

</div>

Hi there @isaw81 !

Here’s a video reference if you’d like to learn more about polling events: [https://youtu.be/3NTaho89xd4](https://youtu.be/3NTaho89xd4)

Also a bunch of cool ecosystem tools you can use such as [Graffle](https://graffle.io/) or [Alchemy’s API for Flow](https://docs.alchemy.com/flow/documentation/flow-api#events)

Would recommend Graffle as it’s infinitely easier than running your own event indexer - so that you can focus on building your actual application.

Let me know if this was useful or if you need more support!
