Return unauthorized code status when not peered
This commit is contained in:
parent
ee4c2ad221
commit
0751c0cf7e
|
@ -61,7 +61,7 @@ func Authenticate(store peering.Store, key *rsa.PublicKey, funcs ...OptionFunc)
|
|||
clientClaims, err := assertClientToken(serverClaims.PeerID, store, clientToken)
|
||||
if err != nil {
|
||||
logger.Printf("[ERROR] %s", err)
|
||||
if err == peering.ErrPeerNotFound {
|
||||
if err == peering.ErrPeerNotFound || err == ErrNotPeered {
|
||||
sendError(w, http.StatusUnauthorized)
|
||||
} else {
|
||||
sendError(w, http.StatusInternalServerError)
|
||||
|
|
Loading…
Reference in New Issue