Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Fixes incorrect error message in Python SDK (#777)

Mish Ushakovd404a8803100
diff --git a/.changeset/mighty-crews-worry.md b/.changeset/mighty-crews-worry.md
new file mode 100644
index 000000000..2c68eefc8
--- /dev/null
+++ b/.changeset/mighty-crews-worry.md
@@ -0,0 +1,5 @@
+---
+'@e2b/python-sdk': patch
+---
+
+changes Python SDK error message on timeout
diff --git a/packages/python-sdk/e2b/envd/rpc.py b/packages/python-sdk/e2b/envd/rpc.py
index c0d8cc31f..5d4bebd60 100644
--- a/packages/python-sdk/e2b/envd/rpc.py
+++ b/packages/python-sdk/e2b/envd/rpc.py
@@ -26,11 +26,11 @@ def handle_rpc_exception(e: Exception):
return format_sandbox_timeout_exception(e.message)
elif e.status == Code.canceled:
return TimeoutException(
- f"{e.message}: This error is likely due to exceeding 'requestTimeoutMs'. You can pass the request timeout value as an option when making the request."
+ f"{e.message}: This error is likely due to exceeding 'request_timeout'. You can pass the request timeout value as an option when making the request."
)
elif e.status == Code.deadline_exceeded:
return TimeoutException(
- f"{e.message}: This error is likely due to exceeding 'timeoutMs' — the total time a long running request (like process or directory watch) can be active. It can be modified by passing 'timeoutMs' when making the request. Use '0' to disable the timeout."
+ f"{e.message}: This error is likely due to exceeding 'timeout' — the total time a long running request (like process or directory watch) can be active. It can be modified by passing 'timeout' when making the request. Use '0' to disable the timeout."
)
else:
return SandboxException(f"{e.status}: {e.message}")