diff --git a/nomad/acl_endpoint.go b/nomad/acl_endpoint.go index 09f187f2c..f45a46497 100644 --- a/nomad/acl_endpoint.go +++ b/nomad/acl_endpoint.go @@ -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