MCPcopy
hub / github.com/cloudflare/capnweb / missingMethod

Function missingMethod

packages/capnweb-validate/src/internal/core.ts:607–615  ·  view source on GitHub ↗
(serviceName: string, prop: string)

Source from the content-addressed store, hash-verified

605
606
607function missingMethod(serviceName: string, prop: string): never {
608 throw newValidationTypeError(
609 `capnweb-validate: refused ${serviceName}.${prop}: it is not declared on ` +
610 `${serviceName}'s RPC interface. To expose it, declare it on the ` +
611 `interface type and rebuild so the validator regenerates. Note that ` +
612 `instance properties cannot be accessed over RPC; define a method or ` +
613 `getter instead.`
614 );
615}
616
617function reportValidationFailure(err: unknown): void {
618 // Warn mode logs the mismatch and lets the value through. Re-throw non-validation errors: those are real bugs.

Callers 1

getFunction · 0.85

Calls 1

newValidationTypeErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…