Skip to content

Commit

Permalink
annotate the error message too
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Sep 28, 2024
1 parent 80f838c commit 91d23ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/connect/src/protocol/invoke-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function transformInvokeImplementation<
const input2 = await inputIt.next();
if (input2.done !== true) {
throw new ConnectError(
"protocol error: received extra input message for unary method",
`protocol error: received extra input message ${spec.method.I.typeName} for unary method ${spec.method.name}`,
Code.Unimplemented,
{
methodName: spec.method.name,
Expand All @@ -168,7 +168,7 @@ export function transformInvokeImplementation<
const input1 = await inputIt.next();
if (input1.done === true) {
throw new ConnectError(
"protocol error: missing input message for server-streaming method",
`protocol error: missing input message ${spec.method.I.typeName} for server-streaming method ${spec.method.name}`,
Code.Unimplemented,
{
methodName: spec.method.name,
Expand Down Expand Up @@ -223,7 +223,7 @@ export function transformInvokeImplementation<
const input2 = await inputIt.next();
if (input2.done !== true) {
throw new ConnectError(
"protocol error: received extra input message for server-streaming method",
`protocol error: received extra input message ${spec.method.I.typeName} for server-streaming method ${spec.method.name}`,
Code.Unimplemented,
{
methodName: spec.method.name,
Expand Down

0 comments on commit 91d23ee

Please sign in to comment.