What happen when invalid dates are given

what heppen when invalid dates are given, build failes or empty list?

A runtime exception is thrown.

yes,exactly but in postman it is returning empty list


so how can we return runtime exception?

Java has methods to throw exceptions

i know about try and catch, but i am saying try and catch will work when there will be no response right? but here it will get a response, irrespective of empty list,but it is getting something right, so how can it throw any exception?

You can throw them explicitly by checking some condition

yes, i am trying that only now,let’s see did it worked for you?

I think it is because that since jsonfile is empty so we cannot convert it to a java object using Jackson and that’s why it is throwing exception. Not sure about it.