use error object for 'err' callback param

Error object contain stacktraces and additional information that helps
debug potential issues. They are expected as the first argument versus
just a string.