Uncaught Exception Handler

“java.util.NoSuchElementException: No value present”
Getting above error. I added a condition where current date is taken if endDate doesn’t exist.
Still the error exists.

It might be due to throwing of null pointer exception. Use try and catch block and handle nullpointerexception.

Its happening because you are using optional, and data is not available on the end-date. You must be running it for 2020-01-01, which is a trading holiday.

Try running it for 2020-01-02, and you will get the data.
Of course you need to fix this error, where data is not present :slight_smile:

You can try that to confirm that its the same error.
I recommend you to change the logic so that if the data is not present on end-datem, you fall back to latest available data, as mentioned in the TODO

Hey @fakerodeo, As there is no response from your side on this topic for the last 13 hrs, Hoping that your issue is resolved, I am closing this topic.

If the issue still exists, you can create a new topic and continue the discussion there with this topic link in the description.