Skip to content

Commit 8ba28e0

Browse files
committed
fix(qa): clarify unsupported transport method errors
1 parent 22e201b commit 8ba28e0

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎extensions/qa-lab/src/scenario-flow-runner.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ describe("scenario-flow-runner", () => {
152152
runLoadedScenarioFlow("channel-message-flows", {
153153
omitOutboundSequence: true,
154154
}),
155-
).rejects.toThrow("qa flow callable not found: transport.waitForOutboundSequence");
155+
).rejects.toThrow(
156+
'QA scenario "channel-message-flows" cannot run "waitForOutboundSequence": the active transport adapter does not implement this method.',
157+
);
156158
});
157159

158160
it("supports qaImport inside flow expressions", async () => {

‎extensions/qa-lab/src/scenario-flow-runner.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ async function resolveValue(node: unknown, api: QaFlowApi, vars: QaFlowVars): Pr
141141
function resolveCallable(path: string, api: QaFlowApi, vars: QaFlowVars) {
142142
const { parent, value } = getPathWithParent(createEvalContext(api, vars), path);
143143
if (typeof value !== "function") {
144+
if (path.startsWith("transport.")) {
145+
const method = path.slice("transport.".length);
146+
throw new Error(
147+
`QA scenario "${api.scenario.id}" cannot run "${method}": the active transport adapter does not implement this method.`,
148+
);
149+
}
144150
throw new Error(`qa flow callable not found: ${path}`);
145151
}
146152
return parent ? value.bind(parent) : value;

0 commit comments

Comments
 (0)