Skip to content

Commit 67b7dea

Browse files
committed
change to unimplemented for unknown methods
1 parent b529a60 commit 67b7dea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/server/src/api/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ export class API {
106106
if (!method) {
107107
// Increment metrics for unknown method attempts
108108
console.warn("public api: unknown method", type.typeName, prop);
109-
const code = Code.InvalidArgument;
109+
const code = Code.Unimplemented;
110110
connectServerStarted.labels(type.typeName, "unknown", "unknown").inc();
111111
connectServerHandled
112112
.labels(type.typeName, "unknown", "unknown", Code[code].toLowerCase())
113113
.observe(0);
114-
throw new ConnectError("Invalid method", code);
114+
throw new ConnectError("unimplemented", code);
115115
}
116116
let kind = "unknown";
117117
if (method.kind === MethodKind.Unary) {

0 commit comments

Comments
 (0)