   (let [bad-setting :standard_conforming_strings
         bad-value "off"
         service (atom nil)
-        start-ex (promise)
+        start-ex (atom nil)
         orig-req svcs/request-database-settings
         request-settings #(for [{n :name :as settings} (orig-req)]
                             (if (= n (name bad-setting))

                  (reset! service svc)
                  (try
                    (let [result (apply orig-start args)]
                      (deliver start-ex nil)
                      result)
                    (catch Exception ex
                      (deliver start-ex ex)
                      (throw ex)))))
        err-msg? #(re-matches #"Invalid database configuration settings: 'standard_.*" %1)]


  ;; Intercept and validate both the throw from start-puppetdb and the
  ;; subsequent shutdown request from start.
  (let [service (atom nil)
        start-ex (atom nil)
        orig-start svcs/start-puppetdb
        start (fn [& args]
                (let [[context config svc get-endpts request-shutdown upgrade?] args]
                  (reset! service svc)
                  (try
                    (let [result (apply orig-start args)]
                      (reset! start-ex nil)
                      result)
                    (catch Exception ex
                      (reset! start-ex ex)
                      (throw ex)))))
        err-msg? #(re-matches #"PostgreSQL 9\.5 is no longer supported\. .*" %1)]

