Add missing "err." in the js driver

Review 879 by @neumino