Re: spec error output in web context

2019-06-09 Thread 'Sven Richter' via Clojure
Am Sonntag, 9. Juni 2019 16:15:38 UTC+2 schrieb Alex Miller: > > > > On Sun, Jun 9, 2019 at 8:43 AM 'Sven Richter' via Clojure < > clo...@googlegroups.com > wrote: > >> >> I also tried to catch the exception and *(-> ex Throwable->map >> clojure.main/ex-triage clojure.main/ex-str) *as you sugges

Re: spec error output in web context

2019-06-09 Thread Alex Miller
On Sun, Jun 9, 2019 at 8:43 AM 'Sven Richter' via Clojure < clojure@googlegroups.com> wrote: > Hi Alex, > > I tracked it down to a minimal example with an explanation here: > https://gist.github.com/sveri/1aaad9b12a8ec90d243206ab3b6073e3 > > The short version is. Running a specced function in the

Re: spec error output in web context

2019-06-09 Thread 'Sven Richter' via Clojure
Hi Alex, I tracked it down to a minimal example with an explanation here: https://gist.github.com/sveri/1aaad9b12a8ec90d243206ab3b6073e3 The short version is. Running a specced function in the clj repl will produce meaningful output, while running in the web context with immutant will print a

Re: spec error output in web context

2019-06-08 Thread Alex Miller
On Saturday, June 8, 2019 at 1:41:59 AM UTC-5, Sven Richter wrote: > > > > Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller: >> >> How do you start the web server? >> > I use component to startup immutant web, I also tried with http-kit, but > that didnt make a difference. > What I m

Re: spec error output in web context

2019-06-07 Thread 'Sven Richter' via Clojure
Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller: > > How do you start the web server? > I use component to startup immutant web, I also tried with http-kit, but that didnt make a difference. Who is printing the error? > I think thats the key point here, right now I dont know as I ne

Re: spec error output in web context

2019-06-07 Thread Alex Miller
How do you start the web server? Who is printing the error? There are functions available in clojure.main to replicate the message from the repl - you can call them yourself. See https://clojure.org/reference/repl_and_main#_error_printing for more on error triage and the functions like Throwab

spec error output in web context

2019-06-07 Thread 'Sven Richter' via Clojure
Hi, I just recently found out that the spec error reporting is different in different environments. I have the following functions: (defn search-page [{:keys [off-url off-user off-password]} search] (let [products (off/search-products search) products-with-nutriments (mapv #(off/add-n