dakrone/clj-http — Issue #35: Make error messages clearer
Author: kumarshantanu
Created: 2012-01-17 23:11:11+00:00
State: open

When executing a GET operation I got this from a Ring server:

```
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at clj_http.core$request.invoke(core.clj:180)
at clojure.lang.Var.invoke(Var.java:365)
at clj_http.client$wrap_query_params$fn__952.invoke(client.clj:137)
at clj_http.client$wrap_user_info$fn__961.invoke(client.clj:162)
at clj_http.client$wrap_url$fn__975.invoke(client.clj:184)
at clj_http.client$wrap_redirects$fn__913.invoke(client.clj:46)
at clj_http.client$wrap_decompression$fn__918.invoke(client.clj:63)
at clj_http.client$wrap_input_coercion$fn__929.invoke(client.clj:88)
at clj_http.client$wrap_output_coercion$fn__924.invoke(client.clj:75)
at clj_http.client$wrap_exceptions$fn__906.invoke(client.clj:32)
at clj_http.client$wrap_basic_auth$fn__956.invoke(client.clj:152)
at clj_http.client$wrap_accept$fn__938.invoke(client.clj:109)
at clj_http.client$wrap_accept_encoding$fn__943.invoke(client.clj:122)
at clj_http.client$wrap_content_type$fn__934.invoke(client.clj:100)
at clj_http.client$wrap_form_params$fn__971.invoke(client.clj:179)
at clj_http.client$wrap_method$fn__966.invoke(client.clj:167)
at clj_http.cookies$wrap_cookies$fn__752.invoke(cookies.clj:114)
at clj_http.client$get.doInvoke(client.clj:234)
at clojure.lang.RestFn.invoke(RestFn.java:424)
...more...
```

It should clearly say what was it expecting and what did it find instead. Without that, it's hard to debug what's wrong.