fix log error and omset tracker scheduled
This commit is contained in:
@@ -16,6 +16,12 @@ func HandleResponse(w http.ResponseWriter, r *http.Request, response *contract.R
|
||||
} else {
|
||||
responseError := response.GetErrors()[0]
|
||||
statusCode = MapErrorCodeToHttpStatus(responseError.GetCode())
|
||||
logger.FromContext(r.Context()).WithFields(map[string]interface{}{
|
||||
"error_code": responseError.GetCode(),
|
||||
"error_entity": responseError.GetEntity(),
|
||||
"error_cause": responseError.GetCause(),
|
||||
"status_code": statusCode,
|
||||
}).Error(methodName)
|
||||
}
|
||||
WriteResponse(w, r, *response, statusCode, methodName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user