feat: log more information on authentication errors
Some checks failed
Cadoles/go-http-peering/pipeline/head There was a failure building this commit

This commit is contained in:
2024-01-05 12:31:33 +01:00
parent b28a87cc5d
commit 34adfb3e87
2 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ func AdvertiseHandler(store peering.Store, key *rsa.PublicKey, funcs ...OptionFu
serverClaims, err := assertServerToken(key, serverToken)
if err != nil {
logger.Printf("[ERROR] %+v", errors.WithStack(err))
logger.Printf("[ERROR] %+v", errors.Wrapf(err, "could not validate token '%s'", serverToken))
sendError(w, http.StatusUnauthorized)
return
}