update clj-http request error handling

the exceptions it throws in the case of an error are now somewhat
different in the latest versions
This commit is contained in:
Gered 2017-03-01 12:53:21 -05:00
parent 4ed1dff618
commit 14a813b70c

View file

@ -85,7 +85,7 @@
(json/parse-string response-body true)
response-body)))
(catch ExceptionInfo ex
(let [{:keys [status body] :as response} (:object (ex-data ex))
(let [{:keys [status body] :as response} (ex-data ex)
fhir-resource-response? (fhir-response? response)]
(throw (ex-info (str "FHIR request failed: HTTP " status)
{:status status