import license REST call and error handling