Compare commits

...
Author SHA1 Message Date
Eva Marco 36c35fb212 Merge branch 'staging' into eva-fix-viewer-request
Signed-off-by: Eva Marco <eva.marco@kaleidos.net>
2026-09-07 14:16:01 +02:00
Eva Marco c54673bf37 🐛 Fix catch validation errors on exception 2026-09-01 10:06:57 +02:00
Eva Marco b8f940aaab 🐛 Fix console error on viewer request 2026-09-01 10:06:57 +02:00
2 changed files with 10 additions and 1 deletions

No files matched your search

+1
View File
@@ -326,6 +326,7 @@
(filter #(= page-id (:page-id %)))
(d/index-by :id)
(assoc state :comment-threads)))
(on-error [cause]
(let [{:keys [type]} (ex-data cause)]
(if (or (= :authentication type)
+9 -1
View File
@@ -541,7 +541,7 @@
(mf/with-effect [report type cause]
(when (and (ex/exception? cause)
(not (contains? #{:not-found :authentication} type)))
(not (contains? #{:not-found :authentication :validation} type)))
(errors/submit-report :event-name "exception-page"
:report report
:hint (ex/get-hint cause))))
@@ -553,6 +553,14 @@
:authentication
[:> not-found* {}]
;; A malformed/invalid resource identifier (e.g. a broken file-id
;; in the URL) surfaces as a generic :validation error rather than
;; :not-found. By the time it reaches here it has no more specific
;; handling (see `handle-error :validation`'s fallback in errors.cljs),
;; so treat it the same as "this page doesn't exist".
:validation
[:> not-found* {}]
:bad-gateway
[:> bad-gateway* props]