Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Improve error messages

Jakub Novak41ccc3fd0d3e
diff --git a/packages/js-sdk/src/sandbox/filesystem/index.ts b/packages/js-sdk/src/sandbox/filesystem/index.ts
index 1a7a551e4..db3758378 100644
--- a/packages/js-sdk/src/sandbox/filesystem/index.ts
+++ b/packages/js-sdk/src/sandbox/filesystem/index.ts
@@ -123,7 +123,7 @@ export class Filesystem {
const files = res.data
if (!files || files.length === 0) {
- throw new SandboxError('Write response did not contain required information')
+ throw new Error('Expected to receive information about written file')
}
return {
@@ -191,7 +191,7 @@ export class Filesystem {
const entry = res.entry
if (!entry) {
- throw new SandboxError('Move response did not contain required information')
+ throw new Error('Expected to receive information about moved object')
}
return {