Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/api_gomux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ func (api *API) readError(rc *req, w http.ResponseWriter, err error) {
api.systemMetrics.Inc(metrics.Error, 1)
var httpStatus = http.StatusInternalServerError
var ret interface{}
log.Printf("API READ ERROR: %v", err)
switch v := err.(type) {
case etre.Error:
maybeInc(metrics.ClientError, 1, rc.gm)
Expand All @@ -1204,7 +1205,6 @@ func (api *API) readError(rc *req, w http.ResponseWriter, err error) {
if dbErr.Err == context.DeadlineExceeded {
maybeInc(metrics.QueryTimeout, 1, rc.gm)
} else {
log.Printf("DATABASE ERROR: %v", dbErr)
maybeInc(metrics.DbError, 1, rc.gm)
}
ret = etre.Error{
Expand All @@ -1215,7 +1215,6 @@ func (api *API) readError(rc *req, w http.ResponseWriter, err error) {
}
httpStatus = http.StatusServiceUnavailable
default:
log.Printf("API ERROR: %v", err)
maybeInc(metrics.APIError, 1, rc.gm)
httpStatus = http.StatusInternalServerError
}
Expand All @@ -1234,6 +1233,7 @@ func (api *API) WriteResult(rc *req, w http.ResponseWriter, ids interface{}, err

// Map error to etre.Error
if err != nil {
log.Printf("API WRITE ERROR: %v", err)
api.systemMetrics.Inc(metrics.Error, 1)
switch v := err.(type) {
case etre.Error:
Expand Down