This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-02
Channels
- # adventofcode (20)
- # bangalore-clj (14)
- # beginners (72)
- # cider (2)
- # clara (2)
- # cljs-dev (8)
- # clojure (36)
- # clojure-brasil (201)
- # clojure-greece (29)
- # clojure-nl (1)
- # clojure-poland (1)
- # clojure-russia (2)
- # clojure-spec (5)
- # clojure-uk (4)
- # clojurescript (41)
- # cursive (1)
- # datomic (1)
- # emacs (6)
- # fulcro (80)
- # graphql (1)
- # klipse (2)
- # leiningen (5)
- # lumo (15)
- # off-topic (1)
- # om (3)
- # om-next (3)
- # re-frame (19)
- # reagent (7)
- # test-check (1)
- # uncomplicate (2)
- # yada (8)
@malcolmsparks btw, the new-classpath-resource needs this fix: https://github.com/juxt/yada/pull/209
@borkdude essentially I tried to have a route structure [… [“assets/” class-path-hander] [true not-found-handler]]. A request with /no-match-url would end up in “my” not-found-handler. But a request to /assets/no-match-url would end up in Yada’s build in 404 page.
We have solved that problem. I can tell you the details later today, but I’m busy right now.
No worries. I’m also busy, so no stress. I was thinking that he new-classpath-resource should return nil and not always a resource. But have not have time to investigate. So look forward to the fix 🙂
@kardan I looked into it, and we did it like this:
(defmethod render-error "text/html"
[status ^Throwable error representation {:keys [id options] :as m}]
(parser/render-file
"error.html"
{:status status
:message (format "%d: %s" status (body/get-error-message status))
:description (body/get-error-description status)
:exception (when dev-env?
(let [baos (java.io.ByteArrayOutputStream.)
pw (java.io.PrintWriter.
(java.io.OutputStreamWriter. baos))]
(.printStackTrace error pw)
(.flush pw)
(String. (.toByteArray baos))))}))
so overriding some behavior of yada