veyron2/verror: Rename NotFound and NotAuthorized, introduce NoExistOrNoAccess.

Rename NotFound to NoExist and NotAuthorized to NoAccess.
Introduce a new error, NoExistOrNoAccess, that indicates that a principal may
not access an entity because it does not exist.
NoExist now indicates that a principal may not access an entity either
because the entity does not exist, or the principal is not authorized to
access the entity.

Change-Id: I74116a5fcc7c2486ae356070c63a8c2b7edcb4bd
diff --git a/lib/config/config.go b/lib/config/config.go
index f2313e6..ff3e44a 100644
--- a/lib/config/config.go
+++ b/lib/config/config.go
@@ -9,7 +9,7 @@
 	"veyron.io/veyron/veyron2/vom"
 )
 
-var ErrKeyNotFound = verror.NotFoundf("config key not found")
+var ErrKeyNotFound = verror.NoExistf("config key not found")
 
 // TODO(caprita): Move the interface to veyron2 and integrate with
 // veyron/services/config.
diff --git a/runtimes/google/ipc/client.go b/runtimes/google/ipc/client.go
index 4a61b55..2dfecec 100644
--- a/runtimes/google/ipc/client.go
+++ b/runtimes/google/ipc/client.go
@@ -25,7 +25,7 @@
 )
 
 var (
-	errNoServers              = verror.NotFoundf("ipc: no servers")
+	errNoServers              = verror.NoExistf("ipc: no servers")
 	errFlowClosed             = verror.Abortedf("ipc: flow closed")
 	errRemainingStreamResults = verror.BadProtocolf("ipc: Finish called with remaining streaming results")
 	errNonRootedName          = verror.BadArgf("ipc: cannot connect to a non-rooted name")
@@ -200,7 +200,7 @@
 
 	servers, err := c.ns.Resolve(ctx, name)
 	if err != nil {
-		return nil, verror.NotFoundf("ipc: Resolve(%q) failed: %v", name, err)
+		return nil, verror.NoExistf("ipc: Resolve(%q) failed: %v", name, err)
 	}
 	// Try all servers, and if none of them are authorized for the call then return the error of the last server
 	// that was tried.
@@ -208,7 +208,7 @@
 	for _, server := range servers {
 		flow, suffix, err := c.connectFlow(server)
 		if err != nil {
-			lastErr = verror.NotFoundf("ipc: couldn't connect to server %v: %v", server, err)
+			lastErr = verror.NoExistf("ipc: couldn't connect to server %v: %v", server, err)
 			vlog.VI(2).Infof("ipc: couldn't connect to server %v: %v", server, err)
 			continue // Try the next server.
 		}
@@ -224,7 +224,7 @@
 		// Validate caveats on the server's identity for the context associated with this call.
 		blessing, err := authorizeServer(flow.LocalID(), flow.RemoteID(), opts)
 		if err != nil {
-			lastErr = verror.NotAuthorizedf("ipc: client unwilling to talk to server %q: %v", flow.RemoteID(), err)
+			lastErr = verror.NoAccessf("ipc: client unwilling to talk to server %q: %v", flow.RemoteID(), err)
 			flow.Close()
 			continue
 		}
@@ -482,7 +482,7 @@
 	vtrace.MergeResponse(fc.ctx, &fc.response.TraceResponse)
 
 	if fc.response.Error != nil {
-		if verror.Is(fc.response.Error, verror.NotAuthorized) && fc.dischargeCache != nil {
+		if verror.Is(fc.response.Error, verror.NoAccess) && fc.dischargeCache != nil {
 			// In case the error was caused by a bad discharge, we do not want to get stuck
 			// with retrying again and again with this discharge. As there is no direct way
 			// to detect it, we conservatively flush all discharges we used from the cache.
diff --git a/runtimes/google/ipc/server.go b/runtimes/google/ipc/server.go
index ae507af..2859f63 100644
--- a/runtimes/google/ipc/server.go
+++ b/runtimes/google/ipc/server.go
@@ -34,7 +34,7 @@
 )
 
 func errNotAuthorized(err error) verror.E {
-	return verror.NotAuthorizedf("ipc: not authorized(%v)", err)
+	return verror.NoAccessf("ipc: not authorized(%v)", err)
 }
 
 type server struct {
@@ -800,7 +800,7 @@
 			return invoker, auth, name, nil
 		}
 	}
-	return nil, nil, "", verror.NotFoundf(fmt.Sprintf("ipc: dispatcher not found for %q", name))
+	return nil, nil, "", verror.NoExistf(fmt.Sprintf("ipc: dispatcher not found for %q", name))
 }
 
 func (fs *flowServer) authorize(auth security.Authorizer) error {
diff --git a/runtimes/google/naming/namespace/namespace.go b/runtimes/google/naming/namespace/namespace.go
index 1482f67..a3a3d2d 100644
--- a/runtimes/google/naming/namespace/namespace.go
+++ b/runtimes/google/naming/namespace/namespace.go
@@ -110,7 +110,7 @@
 	case verror.BadArg:
 		// This should cover "ipc: wrong number of in-args".
 		return true
-	case verror.NotFound:
+	case verror.NoExist:
 		// This should cover "ipc: unknown method", "ipc: dispatcher not
 		// found", and "ipc: LeafDispatcher lookup on non-empty suffix".
 		return true
diff --git a/runtimes/google/testing/mocks/naming/namespace.go b/runtimes/google/testing/mocks/naming/namespace.go
index a587e64..68ae90a 100644
--- a/runtimes/google/testing/mocks/naming/namespace.go
+++ b/runtimes/google/testing/mocks/naming/namespace.go
@@ -70,7 +70,7 @@
 			return ret, nil
 		}
 	}
-	return nil, verror.NotFoundf("Resolve name %q not found in %v", name, ns.mounts)
+	return nil, verror.NoExistf("Resolve name %q not found in %v", name, ns.mounts)
 }
 
 func (ns *namespace) ResolveToMountTable(ctx context.T, name string) ([]string, error) {
diff --git a/services/config/lib/config.go b/services/config/lib/config.go
index 5712d36..3ab82c6 100644
--- a/services/config/lib/config.go
+++ b/services/config/lib/config.go
@@ -147,7 +147,7 @@
 
 func readFile(file string) (*config, error) {
 	if len(file) == 0 {
-		return nil, verror.NotFoundf("no file to read")
+		return nil, verror.NoExistf("no file to read")
 	}
 
 	// The config has to be small so just read it all in one go.
@@ -196,7 +196,7 @@
 	}
 	// Ignore any config with no version.
 	if _, ok := c.pairs["version"]; !ok {
-		return nil, verror.NotFoundf("missing config version")
+		return nil, verror.NoExistf("missing config version")
 	}
 	return c, nil
 }
@@ -309,10 +309,10 @@
 	cs.rwlock.RLock()
 	defer cs.rwlock.RUnlock()
 	if cs.current == nil {
-		return "", verror.NotFoundf("no config")
+		return "", verror.NoExistf("no config")
 	}
 	if v, ok := cs.current.pairs[key]; !ok {
-		return "", verror.NotFoundf("config has no key %q", key)
+		return "", verror.NoExistf("config has no key %q", key)
 	} else {
 		return v, nil
 	}
@@ -330,7 +330,7 @@
 	cs.rwlock.RLock()
 	defer cs.rwlock.RUnlock()
 	if cs.current == nil {
-		return nil, verror.NotFoundf("no config found")
+		return nil, verror.NoExistf("no config found")
 	}
 	// Copy so caller can't change the map under our feet.
 	reply := make(map[string]string)
@@ -365,7 +365,7 @@
 	for _, k := range keys {
 		e, err := serializeEntry(k, cs.current.pairs[k])
 		if err != nil {
-			verror.NotFoundf("offering config: %s", cs.file, err)
+			verror.NoExistf("offering config: %s", cs.file, err)
 			return
 		}
 		txt = append(txt, e)
diff --git a/services/mgmt/binary/impl/impl_test.go b/services/mgmt/binary/impl/impl_test.go
index 5fc06cb..60dc57b 100644
--- a/services/mgmt/binary/impl/impl_test.go
+++ b/services/mgmt/binary/impl/impl_test.go
@@ -310,7 +310,7 @@
 	}
 	if _, _, err := invokeDownload(t, binary, 1); err == nil {
 		t.Fatalf("Download() did not fail when it should have")
-	} else if want := verror.NotFound; !verror.Is(err, want) {
+	} else if want := verror.NoExist; !verror.Is(err, want) {
 		t.Fatalf("Unexpected error: %v, expected error id %v", err, want)
 	}
 	if streamErr, err := invokeUpload(t, binary, data[1], 1); streamErr != nil || err != nil {
@@ -324,7 +324,7 @@
 	}
 	if err := binary.Delete(rt.R().NewContext()); err == nil {
 		t.Fatalf("Delete() did not fail when it should have")
-	} else if want := verror.NotFound; !verror.Is(err, want) {
+	} else if want := verror.NoExist; !verror.Is(err, want) {
 		t.Fatalf("Unexpected error: %v, expected error id %v", err, want)
 	}
 }
diff --git a/services/mgmt/binary/impl/invoker.go b/services/mgmt/binary/impl/invoker.go
index d5821fd..423f44f 100644
--- a/services/mgmt/binary/impl/invoker.go
+++ b/services/mgmt/binary/impl/invoker.go
@@ -83,7 +83,7 @@
 
 var (
 	errExists          = verror.Existsf("binary already exists")
-	errNotFound        = verror.NotFoundf("binary not found")
+	errNotFound        = verror.NoExistf("binary not found")
 	errInProgress      = verror.Internalf("identical upload already in progress")
 	errInvalidParts    = verror.BadArgf("invalid number of binary parts")
 	errOperationFailed = verror.Internalf("operation failed")
diff --git a/services/mgmt/debug/server_test.go b/services/mgmt/debug/server_test.go
index de3ec35..0232bb4 100644
--- a/services/mgmt/debug/server_test.go
+++ b/services/mgmt/debug/server_test.go
@@ -83,7 +83,7 @@
 		if len(results) != 0 {
 			t.Errorf("unexpected result. Got %v, want ''", results)
 		}
-		if expected, got := verror.NotFound, stream.Finish(); !verror.Is(got, expected) {
+		if expected, got := verror.NoExist, stream.Finish(); !verror.Is(got, expected) {
 			t.Errorf("unexpected error value, got %v, want: %v", got, expected)
 		}
 	}
@@ -110,7 +110,7 @@
 			t.Errorf("BindLogFile: %v", err)
 		}
 		_, err = lf.Size(runtime.NewContext())
-		if expected := verror.NotFound; !verror.Is(err, expected) {
+		if expected := verror.NoExist; !verror.Is(err, expected) {
 			t.Errorf("unexpected error value, got %v, want: %v", err, expected)
 		}
 	}
@@ -140,7 +140,7 @@
 			t.Errorf("BindStats: %v", err)
 		}
 		_, err = st.Value(runtime.NewContext())
-		if expected := verror.NotFound; !verror.Is(err, expected) {
+		if expected := verror.NoExist; !verror.Is(err, expected) {
 			t.Errorf("unexpected error value, got %v, want: %v", err, expected)
 		}
 	}
diff --git a/services/mgmt/lib/binary/impl.go b/services/mgmt/lib/binary/impl.go
index 7c87c04..fc52c63 100644
--- a/services/mgmt/lib/binary/impl.go
+++ b/services/mgmt/lib/binary/impl.go
@@ -23,7 +23,7 @@
 
 var (
 	errOperationFailed = verror.Internalf("operation failed")
-	errNotExist        = verror.NotFoundf("binary does not exist")
+	errNotExist        = verror.NoExistf("binary does not exist")
 )
 
 const (
diff --git a/services/mgmt/lib/fs/simplestore.go b/services/mgmt/lib/fs/simplestore.go
index f477f1d..9314cc0 100644
--- a/services/mgmt/lib/fs/simplestore.go
+++ b/services/mgmt/lib/fs/simplestore.go
@@ -198,12 +198,12 @@
 	}
 
 	if _, pendingRemoval := o.ms.removes[o.path]; pendingRemoval {
-		return verror.NotFoundf("path %s not in Memstore", o.path)
+		return verror.NoExistf("path %s not in Memstore", o.path)
 	}
 
 	_, found := o.ms.data[o.path]
 	if !found && !o.ms.removeChildren(o.path) {
-		return verror.NotFoundf("path %s not in Memstore", o.path)
+		return verror.NoExistf("path %s not in Memstore", o.path)
 	}
 	delete(o.ms.puts, o.path)
 	o.ms.removes[o.path] = keyExists
@@ -277,7 +277,7 @@
 
 	found := inPuts || (inBase && !inRemoves)
 	if !found {
-		return nil, verror.NotFoundf("path %s not in Memstore", o.path)
+		return nil, verror.NoExistf("path %s not in Memstore", o.path)
 	}
 
 	if inPuts {
@@ -292,7 +292,7 @@
 	bv, inBase := o.ms.data[o.path]
 
 	if !inBase {
-		return nil, verror.NotFoundf("path %s not in Memstore", o.path)
+		return nil, verror.NoExistf("path %s not in Memstore", o.path)
 	}
 
 	o.Value = bv
diff --git a/services/mgmt/lib/fs/simplestore_test.go b/services/mgmt/lib/fs/simplestore_test.go
index b967ff8..46f37c6 100644
--- a/services/mgmt/lib/fs/simplestore_test.go
+++ b/services/mgmt/lib/fs/simplestore_test.go
@@ -244,18 +244,18 @@
 	}
 
 	// At which point, Get() on the transaction won't find anything.
-	if _, err := memstoreOriginal.BindObject(tP("/test/a")).Get(nil); !verror.Is(err, verror.NotFound) {
-		t.Fatalf("Get() should have failed: got %v, expected %v", err, verror.NotFoundf("path %s not in Memstore", tname+"/test/a"))
+	if _, err := memstoreOriginal.BindObject(tP("/test/a")).Get(nil); !verror.Is(err, verror.NoExist) {
+		t.Fatalf("Get() should have failed: got %v, expected %v", err, verror.NoExistf("path %s not in Memstore", tname+"/test/a"))
 	}
 
 	// Attempting to Remove() it over again will fail.
-	if err := memstoreOriginal.BindObject(tP("/test/a")).Remove(nil); !verror.Is(err, verror.NotFound) {
-		t.Fatalf("Remove() should have failed: got %v, expected %v", err, verror.NotFoundf("path %s not in Memstore", tname+"/test/a"))
+	if err := memstoreOriginal.BindObject(tP("/test/a")).Remove(nil); !verror.Is(err, verror.NoExist) {
+		t.Fatalf("Remove() should have failed: got %v, expected %v", err, verror.NoExistf("path %s not in Memstore", tname+"/test/a"))
 	}
 
 	// Attempting to Remove() a non-existing path will fail.
-	if err := memstoreOriginal.BindObject(tP("/foo")).Remove(nil); !verror.Is(err, verror.NotFound) {
-		t.Fatalf("Remove() should have failed: got %v, expected %v", err, verror.NotFoundf("path %s not in Memstore", tname+"/foo"))
+	if err := memstoreOriginal.BindObject(tP("/foo")).Remove(nil); !verror.Is(err, verror.NoExist) {
+		t.Fatalf("Remove() should have failed: got %v, expected %v", err, verror.NoExistf("path %s not in Memstore", tname+"/foo"))
 	}
 
 	// Exists() a non-existing path will fail.
@@ -279,8 +279,8 @@
 	}
 
 	// Validate that Get will fail on a non-existent path.
-	if _, err := memstoreOriginal.BindObject("/test/c").Get(nil); !verror.Is(err, verror.NotFound) {
-		t.Fatalf("Get() should have failed: got %v, expected %v", err, verror.NotFoundf("path %s not in Memstore", tname+"/test/c"))
+	if _, err := memstoreOriginal.BindObject("/test/c").Get(nil); !verror.Is(err, verror.NoExist) {
+		t.Fatalf("Get() should have failed: got %v, expected %v", err, verror.NoExistf("path %s not in Memstore", tname+"/test/c"))
 	}
 
 	// Verify that the previous Commit() operations have persisted to
diff --git a/services/mgmt/logreader/impl/common.go b/services/mgmt/logreader/impl/common.go
index 5dd31c7..e04045f 100644
--- a/services/mgmt/logreader/impl/common.go
+++ b/services/mgmt/logreader/impl/common.go
@@ -14,7 +14,7 @@
 
 var (
 	errCanceled        = verror.Abortedf("operation canceled")
-	errNotFound        = verror.NotFoundf("log file not found")
+	errNotFound        = verror.NoExistf("log file not found")
 	errEOF             = verror.Make(types.EOF, "EOF")
 	errOperationFailed = verror.Internalf("operation failed")
 )
diff --git a/services/mgmt/logreader/impl/logdir_invoker_test.go b/services/mgmt/logreader/impl/logdir_invoker_test.go
index 0af9a2b..8bd99a3 100644
--- a/services/mgmt/logreader/impl/logdir_invoker_test.go
+++ b/services/mgmt/logreader/impl/logdir_invoker_test.go
@@ -66,7 +66,7 @@
 			t.Errorf("unexpected error, got %v, want: nil", err)
 		}
 		if err := stream.Finish(); err != nil {
-			if expected := verror.NotFound; !verror.Is(err, expected) {
+			if expected := verror.NoExist; !verror.Is(err, expected) {
 				t.Errorf("unexpected error value, got %v, want: %v", err, expected)
 			}
 		}
diff --git a/services/mgmt/logreader/impl/logfile_invoker_test.go b/services/mgmt/logreader/impl/logfile_invoker_test.go
index 9bc0a0e..06487e2 100644
--- a/services/mgmt/logreader/impl/logfile_invoker_test.go
+++ b/services/mgmt/logreader/impl/logfile_invoker_test.go
@@ -72,7 +72,7 @@
 		t.Errorf("BindLogFile: %v", err)
 	}
 	_, err = lf.Size(runtime.NewContext())
-	if expected := verror.NotFound; !verror.Is(err, expected) {
+	if expected := verror.NoExist; !verror.Is(err, expected) {
 		t.Errorf("unexpected error value, got %v, want: %v", err, expected)
 	}
 
diff --git a/services/mgmt/node/impl/dispatcher.go b/services/mgmt/node/impl/dispatcher.go
index 333161b..fa6b7eb 100644
--- a/services/mgmt/node/impl/dispatcher.go
+++ b/services/mgmt/node/impl/dispatcher.go
@@ -62,8 +62,8 @@
 	errOperationFailed    = verror.Internalf("operation failed")
 	errInProgress         = verror.Existsf("operation in progress")
 	errIncompatibleUpdate = verror.BadArgf("update failed: mismatching app title")
-	errUpdateNoOp         = verror.NotFoundf("no different version available")
-	errNotExist           = verror.NotFoundf("object does not exist")
+	errUpdateNoOp         = verror.NoExistf("no different version available")
+	errNotExist           = verror.NoExistf("object does not exist")
 	errInvalidOperation   = verror.BadArgf("invalid operation")
 	errInvalidBlessing    = verror.BadArgf("invalid claim blessing")
 )
diff --git a/services/mgmt/node/impl/impl_test.go b/services/mgmt/node/impl/impl_test.go
index 496c938..595b66e 100644
--- a/services/mgmt/node/impl/impl_test.go
+++ b/services/mgmt/node/impl/impl_test.go
@@ -301,8 +301,8 @@
 	// Simulate an invalid envelope in the application repository.
 	*envelope = *nodeEnvelopeFromCmd(nm.Cmd)
 	envelope.Title = "bogus"
-	updateNodeExpectError(t, "factoryNM", verror.BadArg)   // Incorrect title.
-	revertNodeExpectError(t, "factoryNM", verror.NotFound) // No previous version available.
+	updateNodeExpectError(t, "factoryNM", verror.BadArg)  // Incorrect title.
+	revertNodeExpectError(t, "factoryNM", verror.NoExist) // No previous version available.
 
 	// Set up a second version of the node manager.  We use the blackbox
 	// command solely to collect the args and env we need to provide the
@@ -353,7 +353,7 @@
 
 	// Try issuing an update without changing the envelope in the application
 	// repository: this should fail, and current link should be unchanged.
-	updateNodeExpectError(t, "v2NM", verror.NotFound)
+	updateNodeExpectError(t, "v2NM", verror.NoExist)
 	if evalLink() != scriptPathV2 {
 		t.Fatalf("script changed")
 	}
@@ -551,7 +551,7 @@
 	}
 
 	// Updating the installation to itself is a no-op.
-	updateAppExpectError(t, appID, verror.NotFound)
+	updateAppExpectError(t, appID, verror.NoExist)
 
 	// Updating the installation should not work with a mismatched title.
 	*envelope = *envelopeFromCmd("bogus", app.Cmd)
@@ -616,7 +616,7 @@
 	resolveExpectNotFound(t, "appV1")
 
 	// We are already on the first version, no further revert possible.
-	revertAppExpectError(t, appID, verror.NotFound)
+	revertAppExpectError(t, appID, verror.NoExist)
 
 	// Uninstall the app.
 	uninstallApp(t, appID)
diff --git a/services/mgmt/node/impl/util_test.go b/services/mgmt/node/impl/util_test.go
index ed138f3..0ccebe3 100644
--- a/services/mgmt/node/impl/util_test.go
+++ b/services/mgmt/node/impl/util_test.go
@@ -92,8 +92,8 @@
 func resolveExpectNotFound(t *testing.T, name string) {
 	if results, err := rt.R().Namespace().Resolve(rt.R().NewContext(), name); err == nil {
 		t.Fatalf("Resolve(%v) succeeded with results %v when it was expected to fail", name, results)
-	} else if expectErr := verror.NotFound; !verror.Is(err, expectErr) {
-		t.Fatalf("Resolve(%v) failed with error %v, expected error ID %v", err, expectErr)
+	} else if expectErr := verror.NoExist; !verror.Is(err, expectErr) {
+		t.Fatalf("Resolve(%v) failed with error %v, expected error ID %v", name, err, expectErr)
 	}
 }
 
diff --git a/services/mgmt/stats/impl/stats_invoker.go b/services/mgmt/stats/impl/stats_invoker.go
index 4804db3..449e87a 100644
--- a/services/mgmt/stats/impl/stats_invoker.go
+++ b/services/mgmt/stats/impl/stats_invoker.go
@@ -22,7 +22,7 @@
 }
 
 var (
-	errNotFound        = verror.NotFoundf("object not found")
+	errNotFound        = verror.NoExistf("object not found")
 	errNoValue         = verror.Make(types.NoValue, "object has no value")
 	errOperationFailed = verror.Internalf("operation failed")
 )
diff --git a/services/wsprd/app/app.go b/services/wsprd/app/app.go
index 5b871fc..06a226f 100644
--- a/services/wsprd/app/app.go
+++ b/services/wsprd/app/app.go
@@ -621,7 +621,7 @@
 func (c *Controller) getPublicIDHandle(handle int64) (*PublicIDHandle, error) {
 	id := c.idStore.Get(handle)
 	if id == nil {
-		return nil, verror.NotFoundf("uknown public id")
+		return nil, verror.NoExistf("uknown public id")
 	}
 	return &PublicIDHandle{Handle: handle, Names: id.Names()}, nil
 }
@@ -640,7 +640,7 @@
 	blessee := c.idStore.Get(request.Handle)
 
 	if blessee == nil {
-		return nil, verror.NotFoundf("invalid PublicID handle")
+		return nil, verror.NoExistf("invalid PublicID handle")
 	}
 	blessor := c.rt.Identity()
 
diff --git a/services/wsprd/app/app_test.go b/services/wsprd/app/app_test.go
index 043c150..f0b50d5 100644
--- a/services/wsprd/app/app_test.go
+++ b/services/wsprd/app/app_test.go
@@ -935,6 +935,6 @@
 			"durationMs": 10000,
 			"name":       "foo",
 		},
-		expectedErr: verror.NotFoundf("invalid PublicID handle"),
+		expectedErr: verror.NoExistf("invalid PublicID handle"),
 	}, t)
 }
diff --git a/services/wsprd/identity/identity.go b/services/wsprd/identity/identity.go
index 288fa9d..1c20413 100644
--- a/services/wsprd/identity/identity.go
+++ b/services/wsprd/identity/identity.go
@@ -55,7 +55,7 @@
 	Writers() (data io.WriteCloser, signature io.WriteCloser, err error)
 }
 
-var OriginDoesNotExist = verror.NotFoundf("origin not found")
+var OriginDoesNotExist = verror.NoExistf("origin not found")
 
 // IDManager manages app identities.  We only serialize the accounts associated with
 // this id manager and the mapping of apps to permissions that they were given.
@@ -165,7 +165,7 @@
 	i.mu.Lock()
 	defer i.mu.Unlock()
 	if _, found := i.state.Accounts[account]; !found {
-		return verror.NotFoundf("unknown account %s", account)
+		return verror.NoExistf("unknown account %s", account)
 	}
 
 	old, existed := i.state.Origins[origin]
@@ -187,7 +187,7 @@
 func (i *IDManager) generateBlessedID(origin string, account string, caveats []security.Caveat) (security.PrivateID, error) {
 	blessor := i.state.Accounts[account]
 	if blessor == nil {
-		return nil, verror.NotFoundf("unknown account %s", account)
+		return nil, verror.NoExistf("unknown account %s", account)
 	}
 	// Origins have the form protocol://hostname:port, which is not a valid
 	// blessing name. Hence we must url-encode.
@@ -200,7 +200,7 @@
 	blessed, err := blessor.Bless(blessee.PublicID(), name, 24*time.Hour, caveats)
 
 	if err != nil {
-		return nil, verror.NotAuthorizedf("failed to bless id: %v", err)
+		return nil, verror.NoAccessf("failed to bless id: %v", err)
 	}
 
 	if blessee, err = blessee.Derive(blessed); err != nil {
diff --git a/services/wsprd/ipc/server/invoker.go b/services/wsprd/ipc/server/invoker.go
index 4fa0eb8..b097b6d 100644
--- a/services/wsprd/ipc/server/invoker.go
+++ b/services/wsprd/ipc/server/invoker.go
@@ -39,7 +39,7 @@
 
 	method, ok := i.sig.Methods[methodName]
 	if !ok {
-		return nil, security.AdminLabel, verror.NotFoundf("method name not found in IDL: %s", methodName)
+		return nil, security.AdminLabel, verror.NoExistf("method name not found in IDL: %s", methodName)
 	}
 
 	argptrs := make([]interface{}, len(method.InArgs))
@@ -62,7 +62,7 @@
 	}
 
 	if _, ok := i.sig.Methods[methodName]; !ok {
-		return nil, verror.NotFoundf("method name not found in IDL: %s", methodName)
+		return nil, verror.NoExistf("method name not found in IDL: %s", methodName)
 	}
 
 	replychan := i.invokeFunc(methodName, argptrs, call)