fixes for staging, parsing
This commit is contained in:
@@ -19,13 +19,14 @@
|
||||
:body (pr-str (ql/query (:identity r) (if (= request-method :get) (query-params "query") body) variables ))
|
||||
:headers {"Content-Type" "application/edn"}})
|
||||
(catch Throwable e
|
||||
(log/info "here we are " (.getCause e))
|
||||
|
||||
(if-let [result (:result (ex-data e))]
|
||||
(do (log/warn "Graphql Result error" e)
|
||||
{:status 400
|
||||
:body (pr-str result)
|
||||
:headers {"Content-Type" "application/edn"}})
|
||||
(if-let [message (:validation-error (ex-data e) )]
|
||||
(if-let [message (:validation-error (ex-data (.getCause e)) )]
|
||||
(do
|
||||
(warn-event "GraphQL Validation error" {:message message
|
||||
:data e})
|
||||
|
||||
Reference in New Issue
Block a user