@@ -267,13 +267,7 @@ export async function createLLMConnection(connectionData: LLMConnectionFormData)
267267
268268 // After successful database creation, store secrets in vault
269269 if ( connection && connection . id ) {
270- try {
271- await createVaultSecret ( connection . id . toString ( ) , connectionData ) ;
272- } catch ( vaultError ) {
273- console . error ( 'Failed to store secrets in vault:' , vaultError ) ;
274- // Note: We don't throw here to avoid breaking the connection creation flow
275- // The connection is already created in the database
276- }
270+ await createVaultSecret ( connection . id . toString ( ) , connectionData ) ;
277271 }
278272
279273 return connection ;
@@ -314,11 +308,11 @@ export async function updateLLMConnection(
314308
315309 const connection = data ?. response ;
316310
317- if ( connection && ( connectionData . secretKey && ! connectionData . secretKey ?. includes ( '*' )
318- || connectionData . accessKey && ! connectionData . accessKey ?. includes ( '*' )
319- || connectionData . apiKey && ! connectionData . apiKey ?. includes ( '*' )
320- || connectionData . embeddingAccessKey && ! connectionData . embeddingAccessKey ?. includes ( '*' )
321- || connectionData . embeddingSecretKey && ! connectionData . embeddingSecretKey ?. includes ( '*' )
311+ if ( connection && ( connectionData . secretKey && ! connectionData . secretKey ?. includes ( '*' )
312+ || connectionData . accessKey && ! connectionData . accessKey ?. includes ( '*' )
313+ || connectionData . apiKey && ! connectionData . apiKey ?. includes ( '*' )
314+ || connectionData . embeddingAccessKey && ! connectionData . embeddingAccessKey ?. includes ( '*' )
315+ || connectionData . embeddingSecretKey && ! connectionData . embeddingSecretKey ?. includes ( '*' )
322316 || connectionData . embeddingAzureApiKey && ! connectionData . embeddingAzureApiKey ?. includes ( '*' ) ) ) {
323317 try {
324318 await createVaultSecret ( id . toString ( ) , connectionData ) ;
0 commit comments