Downloading Error Occurred

Every time I try to download iOS 8 onto my iPhone an error message pops up. I have an iPhone 5. I'm trying to update through my mac computer because I heard it's much faster. And I also don't have enough space on my 16GB phone. The message implies it's the internet connection I think, but there's no way that's the problem, because our internet it pretty good.