File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ export async function resolveMcpConfigEnvVars(
3535 const { strict = true } = options
3636 const allMissingVars : string [ ] = [ ]
3737
38+ let envVars : Record < string , string > = { }
39+ try {
40+ envVars = await getEffectiveDecryptedEnv ( userId , workspaceId )
41+ } catch ( error ) {
42+ logger . error ( 'Failed to fetch environment variables for MCP config:' , error )
43+ return { config, missingVars : [ ] }
44+ }
45+
3846 const resolveValue = ( value : string ) : string => {
3947 const missingVars : string [ ] = [ ]
4048 const resolved = resolveEnvVarReferences ( value , envVars , {
@@ -44,14 +52,6 @@ export async function resolveMcpConfigEnvVars(
4452 return resolved
4553 }
4654
47- let envVars : Record < string , string > = { }
48- try {
49- envVars = await getEffectiveDecryptedEnv ( userId , workspaceId )
50- } catch ( error ) {
51- logger . error ( 'Failed to fetch environment variables for MCP config:' , error )
52- return { config, missingVars : [ ] }
53- }
54-
5555 const resolvedConfig = { ...config }
5656
5757 if ( resolvedConfig . url ) {
You can’t perform that action at this time.
0 commit comments