mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
fix(starter): add temp logging to debug executor inability to resolve envvars
This commit is contained in:
@@ -249,7 +249,13 @@ export async function executeProviderRequest(
|
||||
}
|
||||
|
||||
async function makeProxyRequest(providerId: string, payload: any, apiKey: string) {
|
||||
const response = await fetch('/api/proxy', {
|
||||
const baseUrl = process.env.NEXT_PUBLIC_APP_URL
|
||||
if (!baseUrl) {
|
||||
throw new Error('NEXT_PUBLIC_APP_URL environment variable is not set')
|
||||
}
|
||||
|
||||
const proxyUrl = new URL('/api/proxy', baseUrl).toString()
|
||||
const response = await fetch(proxyUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -102,7 +102,13 @@ export async function executeTool(
|
||||
}
|
||||
|
||||
// For external APIs, use the proxy
|
||||
const response = await fetch('/api/proxy', {
|
||||
const baseUrl = process.env.NEXT_PUBLIC_APP_URL
|
||||
if (!baseUrl) {
|
||||
throw new Error('NEXT_PUBLIC_APP_URL environment variable is not set')
|
||||
}
|
||||
|
||||
const proxyUrl = new URL('/api/proxy', baseUrl).toString()
|
||||
const response = await fetch(proxyUrl, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ toolId, params }),
|
||||
|
||||
Reference in New Issue
Block a user