fix on error reject

Call promise reject handler.