404 if token isn't found

This commit is contained in:
Mahmood Ali 2019-11-19 15:52:53 -05:00
parent 6f8bb5e90b
commit 97d0fd009d
1 changed files with 1 additions and 1 deletions

View File

@ -510,7 +510,7 @@ func (a *ACL) UpsertTokens(args *structs.ACLTokenUpsertRequest, reply *structs.A
return structs.NewErrRPCCodedf(400, "token lookup failed: %v", err)
}
if out == nil {
return structs.NewErrRPCCodedf(400, "cannot find token %s", token.AccessorID)
return structs.NewErrRPCCodedf(404, "cannot find token %s", token.AccessorID)
}
// Cannot toggle the "Global" mode