operational improvements in log messages (#186)

This commit is contained in:
Michael Quigley
2023-01-30 11:38:55 -05:00
parent 18bd8a798e
commit d9258a2915
9 changed files with 57 additions and 60 deletions

View File

@ -7,7 +7,6 @@ import (
"github.com/openziti/zrok/controller/zrokEdgeSdk"
"github.com/openziti/zrok/rest_model_zrok"
"github.com/openziti/zrok/rest_server_zrok/operations/share"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@ -45,8 +44,7 @@ func (h *unaccessHandler) Handle(params share.UnaccessParams, principal *rest_mo
}
}
if senv == nil {
err := errors.Errorf("environment with id '%v' not found for '%v", envZId, principal.Email)
logrus.Error(err)
logrus.Errorf("environment with id '%v' not found for '%v", envZId, principal.Email)
return share.NewUnaccessUnauthorized()
}
} else {
@ -56,7 +54,7 @@ func (h *unaccessHandler) Handle(params share.UnaccessParams, principal *rest_mo
sfe, err := str.FindFrontendWithToken(feToken, tx)
if err != nil {
logrus.Error(err)
logrus.Errorf("error finding frontend for '%v': %v", principal.Email, err)
return share.NewUnaccessInternalServerError()
}