From adffc7cb1d64c6632e6b46ac2476a3786ac05363 Mon Sep 17 00:00:00 2001 From: Yongtae Date: Sat, 5 Aug 2023 03:33:26 +0900 Subject: [PATCH] Add error handling for missing Google Application Credential file path --- .../GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts b/packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts index 205e12ef..7b859e77 100644 --- a/packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts +++ b/packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts @@ -55,6 +55,7 @@ class GoogleVertexAIEmbedding_Embeddings implements INode { const location = nodeData.inputs?.location as string const credentialData = await getCredentialData(nodeData.credential ?? '', options) const googleApplicationCredentialFilePath = getCredentialParam('googleApplicationCredentialFilePath', credentialData, nodeData) + if (!googleApplicationCredentialFilePath) throw new Error('Please specify your Google Application Credential file path') const authOptions: GoogleAuthOptions = { keyFile: googleApplicationCredentialFilePath