backend: cleanup error handling logic

I was reviewing this code and had a hard time reasoning about it. I
think this clears things up. Totally untested though.
Merge pull request #79 from coreos/cleanup-nested-ifs

backend: cleanup error handling logic