Fix: Handle undefined result.body.metadata gracefully
All checks were successful
Build and Push Backend / build (push) Successful in 5s
All checks were successful
Build and Push Backend / build (push) Successful in 5s
Pod creation succeeds but response structure may not have metadata. Add safe navigation to prevent error. Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -204,7 +204,9 @@ export async function createAgentPod(podName: string, userId: string): Promise<v
|
||||
}, undefined, undefined, undefined, undefined, options)
|
||||
|
||||
console.log(`✅ Pod ${podName} created successfully`)
|
||||
console.log(`✅ Pod UID: ${result.body.metadata?.uid}`)
|
||||
if (result?.body?.metadata?.uid) {
|
||||
console.log(`✅ Pod UID: ${result.body.metadata.uid}`)
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(`❌ Failed to create pod ${podName}`)
|
||||
console.error(`❌ Error message:`, error.message)
|
||||
|
||||
Reference in New Issue
Block a user