mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-24 08:31:24 +01:00
Merge pull request #11588 from wy65701436/trace-error
update trace level to error
This commit is contained in:
commit
2d618370ae
@ -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