Skip to content

Commit

Permalink
add details about underlying message types on input message protocol …
Browse files Browse the repository at this point in the history
…errors
  • Loading branch information
tmm1 committed Sep 28, 2024
1 parent b735d79 commit 7737461
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/connect/src/protocol/invoke-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ export function transformInvokeImplementation<
throw new ConnectError(
"protocol error: received extra input message for unary method",
Code.Unimplemented,
{
methodName: spec.method.name,
serviceTypeName: spec.service.typeName,
inputTypeName: spec.method.I.typeName,
outputTypeName: spec.method.O.typeName,
url: context.url,
requestMethod: context.requestMethod,
}
);
}
};
Expand All @@ -162,6 +170,14 @@ export function transformInvokeImplementation<
throw new ConnectError(
"protocol error: missing input message for server-streaming method",
Code.Unimplemented,
{
methodName: spec.method.name,
serviceTypeName: spec.service.typeName,
inputTypeName: spec.method.I.typeName,
outputTypeName: spec.method.O.typeName,
url: context.url,
requestMethod: context.requestMethod,
}
);
}
const anyFn = async (
Expand Down Expand Up @@ -209,6 +225,14 @@ export function transformInvokeImplementation<
throw new ConnectError(
"protocol error: received extra input message for server-streaming method",
Code.Unimplemented,
{
methodName: spec.method.name,
serviceTypeName: spec.service.typeName,
inputTypeName: spec.method.I.typeName,
outputTypeName: spec.method.O.typeName,
url: context.url,
requestMethod: context.requestMethod,
}
);
}
};
Expand Down

0 comments on commit 7737461

Please sign in to comment.