            :header {"Content-Type" "text/html"}
            :body (views/edit-profile "edit-profile" request :user-profile user-profile)})
 
-        {:status 500}))
-    {:status 401}))
+        (do (log/info (str "edit-profile-get: api get-user request error " {:status user-status :user-id (:identity (friend/current-authentication))}))
+            (default-error-page request 500))))
+    (do (log/info (str "edit-profile-get: attempt to edit profile when not a writer"))
+        (default-error-page request 401))))
 
 (defn edit-profile-post [request]
   (if (permissions/writer? (friend/current-authentication))


      ::http-api/not-found (error-404-response request)

      {:status 500})))

(defn add-draft-post [{:keys [params route-params] :as request}]
  (let [draft-data (fr/request->add-draft-data request (get (friend/current-authentication) :identity))]

                       (assoc (response/redirect objective-url) :flash {:type :share-question
                                                                        :created-question question}))

                     (= status ::http-api/invalid-input)
                     (do (log/info (str "add-question-form-post: invalid input when creating question" {:data (:data question-data)}))
                         (default-error-page request 400))

                     :else
                     (do (log/info (str "add-question-form-post: error when creating question" {:http-api-status status}))
                         (default-error-page request 502))))
      
      ::fr/invalid (-> (response/redirect (utils/path-for :fe/add-a-question
                                                          :id (:id route-params)))
                       (assoc :flash {:validation (dissoc question-data :status)})))))
