fixed wrong function call 'error' should be 'err'

http://docs.puppetlabs.com/references/2.7.latest/function.html#err