       (throw (ex-info (str "Couldn't find token " token)
                       {:headers {"etag" token-hash}
                        :status 404
-                       :token token})))))
+                       :token token
+                       :log-level :warn})))))
 
 (defn- handle-post-token-request
   "Validates that the user is the creator of the token if it already exists.

            (utils/clj->json-response {:delete token, :hard-delete hard-delete, :success true}
                                      :headers {"etag" version-hash}))
          (throw (ex-info (str "Token " token " does not exist")
                          {:status 404 :token token}))))
      (throw (ex-info "Couldn't find token in request" {:status 400 :token token})))))

(defn- handle-get-token-request
  "Returns the configuration if found.

            (throw (ex-info "Cannot run as user"
                            {:authenticated-user authenticated-user
                             :run-as-user run-as-user
                             :status 403
                             :log-level :warn}))))
        (let [existing-service-description-owner (get existing-token-metadata "owner")]
          (if-not (str/blank? existing-service-description-owner)
            (when-not (authz/manage-token? entitlement-manager authenticated-user token existing-token-metadata)
              (throw (ex-info "Cannot change owner of token"
                              {:existing-owner existing-service-description-owner
                               :new-user owner
                               :status 403
                               :log-level :warn})))
            (when-not (authz/run-as? entitlement-manager authenticated-user owner)
              (throw (ex-info "Cannot create token as user"
                              {:authenticated-user authenticated-user
                               :owner owner
                               :status 403
                               :log-level :warn})))))
        (when (contains? new-token-metadata "last-update-time")
          (throw (ex-info "Cannot modify last-update-time token metadata"
                          {:status 400
                           :token-metadata new-token-metadata
                           :log-level :warn})))
        (when (contains? new-token-metadata "last-update-user")
          (throw (ex-info "Cannot modify last-update-user token metadata"
                          {:status 400
                           :token-metadata new-token-metadata
                           :log-level :warn})))
        (when (contains? new-token-metadata "root")
          (throw (ex-info "Cannot modify root token metadata"
                          {:status 400
                           :token-metadata new-token-metadata
                           :log-level :warn})))
        (when (contains? new-token-metadata "previous")
          (throw (ex-info "Cannot modify previous token metadata"
                          {:status 400
                           :token-metadata new-token-metadata
                           :log-level :warn}))))

      (throw (ex-info "Invalid update-mode"
                      {:mode (get request-params "update-mode")
                       :status 400
                       :log-level :warn})))

    (when-let [previous (get new-token-metadata "previous")]
      (when-not (map? previous)
        (throw (ex-info (str "Token previous must be a map")
                        {:previous previous :status 400 :token token :log-level :warn}))))

    ; Store the token
    (let [new-token-metadata (merge {"cluster" (calculate-cluster cluster-calculator request)
