fix error is not defined bug.

the method is `fail`,but used the `error`
Merge pull request #150 from dozer47528/master

fix error is not defined bug.