on error, check for body before looking in it

prevents things like connection errors (which don't return a body) from causing another error when `body` is undefined and we check for `body.error`
Merge pull request #4 from bkendall/fix-check-for-body-on-error

On Error, body.error check