   (GET "/api/v1/topology/:id/profiling/dumpprofile/:host-port"
        [:as {:keys [servlet-request]} id host-port & m]
        (thrift/with-configured-nimbus-connection nimbus
-         (let [user (.getUserName http-creds-handler servlet-request)
-               topology-conf (from-json
-                              (.getTopologyConf ^Nimbus$Client nimbus id))]
-           (assert-authorized-user "setWorkerProfiler" (topology-config id))
-           (assert-authorized-profiler-action "dumpprofile"))
+         (assert-authorized-user "setWorkerProfiler" (topology-config id))
+         (assert-authorized-profiler-action "dumpprofile")
          (let [[host, port] (split host-port #":")
                nodeinfo (NodeInfo. host (set [(Long. port)]))
                timestamp (System/currentTimeMillis)

  (GET "/api/v1/topology/:id/profiling/stop/:host-port"
       [:as {:keys [servlet-request]} id host-port & m]
       (thrift/with-configured-nimbus-connection nimbus
         (let [user (.getUserName http-creds-handler servlet-request)
               topology-conf (from-json
                              (.getTopologyConf ^Nimbus$Client nimbus id))]
           (assert-authorized-user "setWorkerProfiler" (topology-config id))
           (assert-authorized-profiler-action "stop"))
         (let [[host, port] (split host-port #":")
               nodeinfo (NodeInfo. host (set [(Long. port)]))
               timestamp 0

  (GET "/api/v1/topology/:id/profiling/dumpheap/:host-port"
       [:as {:keys [servlet-request]} id host-port & m]
       (thrift/with-configured-nimbus-connection nimbus
         (assert-authorized-user "setWorkerProfiler" (topology-config id))
         (assert-authorized-profiler-action "dumpheap")
         (let [[host, port] (split host-port #":")
               nodeinfo (NodeInfo. host (set [(Long. port)]))
               timestamp (System/currentTimeMillis)
