I'd be more comfortable if you'd check that 'err' is not falsy here. Like : `err = err || { name: 'UnknownError' };`