Adding api to get latest partition date for cube

Shouldnt be return. It should be continue in for loop. May be you should add another try-catch inside for-loop