From 0dfa62a5b6708ef1790126fbd793e6034a6a0f0c Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 26 Mar 2026 15:42:49 +0100 Subject: [PATCH] :bug: Improve error reporting on request parsing failures (#8805) Include request URI and status in frontend handle-response error data, and add request path/context to backend IOException handler logs and response body. Previously these errors had no identifying information about which endpoint or request caused the failure. --- backend/src/app/http/errors.clj | 14 ++++++++------ frontend/src/app/main/repo.cljs | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/src/app/http/errors.clj b/backend/src/app/http/errors.clj index 95e0f4e7b1..bcf6df27f6 100644 --- a/backend/src/app/http/errors.clj +++ b/backend/src/app/http/errors.clj @@ -220,12 +220,14 @@ (assoc :hint (ex-message error)))})))) (defmethod handle-exception java.io.IOException - [cause _ _] - (l/wrn :hint "io exception" :cause cause) - {::yres/status 500 - ::yres/body {:type :server-error - :code :io-exception - :hint (ex-message cause)}}) + [cause request _] + (binding [l/*context* (request->context request)] + (l/wrn :hint "io exception" :cause cause) + {::yres/status 500 + ::yres/body {:type :server-error + :code :io-exception + :hint (ex-message cause) + :path (:path request)}})) (defmethod handle-exception java.util.concurrent.CompletionException [cause request _] diff --git a/frontend/src/app/main/repo.cljs b/frontend/src/app/main/repo.cljs index ad252e2a04..c7a3133558 100644 --- a/frontend/src/app/main/repo.cljs +++ b/frontend/src/app/main/repo.cljs @@ -53,7 +53,7 @@ :code :challenge-required})) (and (>= status 400) (map? body)) - (rx/throw (ex-info "http error" body)) + (rx/throw (ex-info "http error" (assoc body :uri uri :status status))) :else (rx/throw