mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 12:46:03 +01:00
update trace level to error
Use level error instead to log trace Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
adb305e4e1
commit
7622c17817
@ -50,8 +50,7 @@ func SendError(w http.ResponseWriter, err error) {
|
||||
statusCode, errPayload, stackTrace := apiError(err)
|
||||
// the error detail is logged only, and will not be sent to the client to avoid leaking server information
|
||||
if statusCode >= http.StatusInternalServerError {
|
||||
log.Error(errPayload)
|
||||
log.Debug(stackTrace)
|
||||
log.Errorf("%s %s", errPayload, stackTrace)
|
||||
err = errors.New(nil).WithCode(errors.GeneralCode).WithMessage("internal server error")
|
||||
errPayload = errors.NewErrs(err).Error()
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user