add promise.fail to suport the failed cases in geocoding and layer query