We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dafae52 commit ed19e79Copy full SHA for ed19e79
packages/vertexai/test-utils/mock-response.ts
@@ -58,6 +58,9 @@ export function getMockResponseStreaming(
58
59
export function getMockResponse(filename: string): Partial<Response> {
60
const fullText = mocksLookup[filename];
61
+ if (!(filename in mocksLookup)) {
62
+ throw Error(`Mock response file '${filename}' not found.`);
63
+ }
64
return {
65
ok: true,
66
json: () => Promise.resolve(JSON.parse(fullText))
0 commit comments