Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Improve texting
Jakub Novakf49a2ea38b1d
diff --git a/packages/js-sdk/src/api/index.ts b/packages/js-sdk/src/api/index.tsindex 0e62b3778..977828d15 100644--- a/packages/js-sdk/src/api/index.ts+++ b/packages/js-sdk/src/api/index.ts@@ -14,9 +14,7 @@ export function handleApiError(}if (response.response.status === 429) {- return new RateLimitError(- 'Authentication failed, please check your API key and access token.'- )+ return new RateLimitError('Rate limit exceeded, please try again later.')}const message = response.error?.message ?? response.errordiff --git a/packages/js-sdk/src/errors.ts b/packages/js-sdk/src/errors.tsindex 271b68133..c4d472f5b 100644--- a/packages/js-sdk/src/errors.ts+++ b/packages/js-sdk/src/errors.ts@@ -86,7 +86,7 @@ export class TemplateError extends SandboxError {}/**- * Thrown when the rate limit either for API or sandbox is exceeded.+ * Thrown when the API rate limit is exceeded.*/export class RateLimitError extends SandboxError {constructor(message: any) {diff --git a/packages/python-sdk/e2b/api/__init__.py b/packages/python-sdk/e2b/api/__init__.pyindex fea67173b..f3d3c1988 100644--- a/packages/python-sdk/e2b/api/__init__.py+++ b/packages/python-sdk/e2b/api/__init__.py@@ -10,7 +10,7 @@ from e2b.api.metadata import default_headersfrom e2b.exceptions import (AuthenticationException,SandboxException,- RateLimitSandboxException,+ RateLimitException,)from e2b.api.client.types import Response@@ -24,7 +24,7 @@ def handle_api_exception(e: Response):body = {}if e.status_code == 429:- return RateLimitSandboxException(+ return RateLimitException(f"{e.status_code}: Rate limit exceeded, please try again later.")diff --git a/packages/python-sdk/e2b/exceptions.py b/packages/python-sdk/e2b/exceptions.pyindex 3223572ef..d0214936b 100644--- a/packages/python-sdk/e2b/exceptions.py+++ b/packages/python-sdk/e2b/exceptions.py@@ -77,7 +77,7 @@ class TemplateException(SandboxException):"""-class RateLimitSandboxException(SandboxException):+class RateLimitException(SandboxException):"""- Raised when the rate limit either for API or sandbox is exceeded.+ Raised when the API rate limit is exceeded."""