fix: ensure task error proper throw with worker-threads