Swirrl / csv2rdf

Clojure library and command line application for converting CSV to RDF. An implementation of the W3C CSVW specifications
Eclipse Public License 1.0
26 stars 6 forks source link

Include URL in error message when getting a HTTP 406 #258

Open AlasdairGray opened 1 year ago

AlasdairGray commented 1 year ago

When a HTTP 406 error is generated, the resource URL that generated the error is not included in the error message. For example, the following is one that I received:

#error {
 :cause clj-http: status 406
 :data {:headers {server nginx, date Fri, 18 Nov 2022 15:33:47 GMT, content-type text/html; charset=UTF-8, content-length 0, connection keep-alive, x-request-id 20f262ac-b395-4e96-841e-2cb25ec61289, x-runtime 0.037666}, :status 406, :body nil}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message clj-http: status 406
   :data {:headers {server nginx, date Fri, 18 Nov 2022 15:33:47 GMT, content-type text/html; charset=UTF-8, content-length 0, connection keep-alive, x-request-id 20f262ac-b395-4e96-841e-2cb25ec61289, x-runtime 0.037666}, :status 406, :body nil}
   :at [slingshot.support$stack_trace invoke support.clj 201]}]
 :trace

In a HTTP 404 error the URL is included which is super helpful when debuggin.