Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Fix CLI regression (#762)

Jakub Novákca905b063911
diff --git a/.changeset/few-brooms-doubt.md b/.changeset/few-brooms-doubt.md
new file mode 100644
index 000000000..af0d2b391
--- /dev/null
+++ b/.changeset/few-brooms-doubt.md
@@ -0,0 +1,5 @@
+---
+'@e2b/cli': patch
+---
+
+Fix regression if no data in response
diff --git a/packages/cli/src/utils/errors.ts b/packages/cli/src/utils/errors.ts
index f5840c4c2..9c1708a9e 100644
--- a/packages/cli/src/utils/errors.ts
+++ b/packages/cli/src/utils/errors.ts
@@ -12,7 +12,7 @@ export function handleE2BRequestError<T>(
res: { data?: T | null | undefined; error?: { code: number; message: string } },
errMsg?: string,
): asserts res is { data: T; error?: undefined } {
- if (!res.error && res.data != null) {
+ if (!res.error) {
return
}