fixed exception thrown when promise is canceled