upgraded ionic version; added error handling to API calls