Use domain.intercept to handle error throw