    resource. This is a 405 status code. Information from the request is used to
    provide a reasonable message."
   [{:keys [uri request-method] :as request}]
-  (-> (str "invalid method (" (name (or request-method "UNKNOWN")) ") for " (or uri "UNKNOWN"))
-      (ex-response 405 uri)))
+  (let [msg (format "invalid method (%s) for %s"
+                    (name (or request-method "UNKNOWN"))
+                    (or uri "UNKNOWN"))]
+    (ex-response msg 405 uri)))
 
 
 (defn ex-bad-action

  "Provides an ExceptionInfo exception when the input is not valid. This is a
   400 status response. If the message is not provided, a generic one is used."
  [& [msg]]
  (-> (or msg "invalid request")
      (ex-response 400)))


(defn ex-not-found
  "Provides an ExceptionInfo exception when a resource is not found. This is a
   404 status response and the provided id should be the resource identifier."
  [id]
  (-> (str id " not found")
      (ex-response 404 id)))


(defn ex-conflict
  "Provides an ExceptionInfo exception when there is a conflict. This is a 409
   status response and the provided id should be the resource identifier."
  [id]
  (-> (str "conflict with " id)
      (ex-response 409 id)))


(defn ex-unauthorized


(defn response-not-found
  [id]
  (map-response (str id " not found") 404 id))


(defn response-error
