Fix arity of error_fun
Merge pull request #3 from layerhq/hotfix-error-fun-arity

Fix arity of error_fun