Added error case for wrong api version