Skip to content
Permalink
Browse files

Clean up redundant error messages. (#847)

* Clean up redundant error messages.

We log both the thrown error as well as the log/error.

* Update waiter/src/waiter/service.clj

Co-Authored-By: Steven Radack <sradack@gmail.com>
  • Loading branch information...
scrosby and sradack committed Jul 11, 2019
1 parent dd6bd41 commit efd6a5cc624d04c1af48e172a79a599487afe955
Showing with 3 additions and 5 deletions.
  1. +2 −2 waiter/src/waiter/process_request.clj
  2. +1 −3 waiter/src/waiter/service.clj
@@ -417,9 +417,9 @@
[bytes-streamed false])))
(catch Exception e
(histograms/update! (metrics/service-histogram service-id "response-size") bytes-streamed)
(log/error "error occurred after streaming" bytes-streamed "bytes in response.")
; Handle lower down
(throw e)))]
(throw (Exception.
(str "error occurred after streaming" bytes-streamed "bytes in response.") e))))]
(let [bytes-reported-to-statsd'
(let [unreported-bytes (- bytes-streamed' bytes-reported-to-statsd)]
(if (or (and (not more-bytes-possibly-available?) (pos? unreported-bytes))
@@ -89,7 +89,6 @@
(throw (ex-info "Unable to put instance on work-stealing-chan."
{:offer-params ~offer-params, :service-id ~service-id}))))
(do
(log/error "Unable to find work-stealing-chan for service" ~service-id)
(throw (ex-info "Unable to find work-stealing-chan."
{:offer-params ~offer-params, :service-id ~service-id}))))))

@@ -165,9 +164,8 @@
(throw (ex-info "Unable to put instance on release-chan."
{:instance ~instance})))
(do
(log/error "Unable to find release-chan for service" service-id#)
(throw (ex-info "Unable to find release-chan."
{:instance ~instance}))))))
{:instance ~instance :service-id service-id#}))))))

(defn release-instance-go
"Sends a rpc to the router state to release the lock on the given instance."

0 comments on commit efd6a5c

Please sign in to comment.
You can’t perform that action at this time.