Fix issue when rejecting promise without error