Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix ports error

Tomas Valenta61687d96079a
diff --git a/api-service/playground/src/sessions/session.ts b/api-service/playground/src/sessions/session.ts
index f73a668bb..74c3527b3 100644
--- a/api-service/playground/src/sessions/session.ts
+++ b/api-service/playground/src/sessions/session.ts
@@ -41,7 +41,13 @@ export class CachedSession {
},
codeSnippet: {
onScanPorts: (ports) => {
- this.ports = ports
+ // We need to remap the ports because there is a lot of hidden properties
+ // that breaks the generated API between client and server.
+ this.ports = ports.map(p => ({
+ Ip: p.Ip,
+ Port: p.Port,
+ State: p.State,
+ }))
},
},
})