Skip to content

Commit d404a88

Browse files
authored
Fixes incorrect error message in Python SDK (#777)
- closes #776 - changes timeout error message in Python SDK, before was same as in the JS SDK which is incorrect.
1 parent 4aaeee2 commit d404a88

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/mighty-crews-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/python-sdk': patch
3+
---
4+
5+
changes Python SDK error message on timeout

packages/python-sdk/e2b/envd/rpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def handle_rpc_exception(e: Exception):
2626
return format_sandbox_timeout_exception(e.message)
2727
elif e.status == Code.canceled:
2828
return TimeoutException(
29-
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."
29+
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."
3030
)
3131
elif e.status == Code.deadline_exceeded:
3232
return TimeoutException(
33-
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."
33+
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."
3434
)
3535
else:
3636
return SandboxException(f"{e.status}: {e.message}")

0 commit comments

Comments
 (0)