         :else (error-404-response request))
 
       (= status ::http-api/not-found) (error-404-response request)
-      :else {:status 500})))
+      
+      :else (do (log/info (str "writer-invitation: error retrieving invitation " {:http-api-status status
+                                                                                  :uuid uuid}))
+                (default-error-page request 500)))))
 
 (defn create-profile-get [request]
   {:status 200


      ::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))]

          (permissions/add-authorisation-role (permissions/writer-inviter-for objective-id))
          (permissions/add-authorisation-role (permissions/writer-for objective-id)))

      :else (do (log/info (str "create-writer: post-writer api error " {:http-api-status status
                                                                        :data writer}))
                (default-error-page request 500)))))

(defn accept-invitation [{:keys [session] :as request}]
  (if-let [invitation-credentials (:invitation session)]
