mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Add error handling for missing Google Application Credential file path
This commit is contained in:
+1
@@ -55,6 +55,7 @@ class GoogleVertexAIEmbedding_Embeddings implements INode {
|
|||||||
const location = nodeData.inputs?.location as string
|
const location = nodeData.inputs?.location as string
|
||||||
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
||||||
const googleApplicationCredentialFilePath = getCredentialParam('googleApplicationCredentialFilePath', credentialData, nodeData)
|
const googleApplicationCredentialFilePath = getCredentialParam('googleApplicationCredentialFilePath', credentialData, nodeData)
|
||||||
|
if (!googleApplicationCredentialFilePath) throw new Error('Please specify your Google Application Credential file path')
|
||||||
|
|
||||||
const authOptions: GoogleAuthOptions = {
|
const authOptions: GoogleAuthOptions = {
|
||||||
keyFile: googleApplicationCredentialFilePath
|
keyFile: googleApplicationCredentialFilePath
|
||||||
|
|||||||
Reference in New Issue
Block a user