We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f0ff5f commit a6a1156Copy full SHA for a6a1156
2 files changed
.changeset/icy-eggs-change.md
@@ -0,0 +1,5 @@
1
+---
2
+'@e2b/cli': minor
3
4
+
5
+Handle sandbox not found on cli info
packages/cli/src/commands/sandbox/info.ts
@@ -1,5 +1,5 @@
import * as commander from 'commander'
-import { Sandbox } from 'e2b'
+import { NotFoundError, Sandbox } from 'e2b'
import { ensureAPIKey } from 'src/api'
import { asBold } from 'src/utils/format'
@@ -62,6 +62,11 @@ export const infoCommand = new commander.Command('info')
62
process.exit(1)
63
}
64
} catch (err: any) {
65
+ if (err instanceof NotFoundError) {
66
+ console.error(`Sandbox ${asBold(sandboxID)} wasn't found`)
67
+ process.exit(1)
68
+ return
69
+ }
70
console.error(err)
71
72
0 commit comments