 
 (schema/defn ^:always-validate guarded-status-fn-call :- StatusCallbackResponse
   "Given a status check function, a status detail level, and a timeout in
-  seconds, this function calls the status function and handles three types of
-  errors:
+  (integral) seconds, this function calls the status function and handles three
+  types of errors:
 
   * Status check timed out
   * Status check threw an Exception

    (validation-error-explain schema-failure)
    schema-failure))

(schema/defn check-timeout :- schema/Int
  "Given a status level keyword, returns a number of seconds to use as a timeout
  when calling a status function."
  [level :- ServiceStatusDetailLevel]
  (case level
    :critical 5

  string describing the error."
  [status-fn :- StatusFn
   level :- ServiceStatusDetailLevel
   timeout :- WholeSeconds]
   (let [unknown-response (fn [status] {:state :unknown
                                        :status status})
         timeout-response (unknown-response (format "Status check timed out after %s seconds" timeout))]
