switch error checking logic to use failure?

Bounty: https://assembly.com/coderwall/wips/244