Common errors
You may receive either of these errors:SANDBOX_ALREADY_EXISTS (409)RATE_LIMIT_EXCEEDED (429)
Root cause
Duplicate creation requests commonly result from:- React Strict Mode intentionally running effects twice in development
- React hooks running again during component re-renders
- Rapid user interactions triggering the same API call
Use idempotent creation
UsecreateIfNotExists() in TypeScript or create_if_not_exists() in Python instead of create(). These methods handle a 409 conflict by returning the existing sandbox.
Add request guards
As an optional client-side safeguard:- Track an in-progress request with an
isCreatingflag - Check whether creation is already in progress before sending another request
- Show an appropriate loading state while creation completes
Handle React Strict Mode
In React development environments:- Cancel duplicate requests in the
useEffectcleanup function - Define accurate dependency arrays to avoid unnecessary effect runs
- Track request state across re-renders with
useRef
Investigate persistent failures
If race conditions continue after you apply these changes:- Record the sandbox ID and error timestamp.
- Check whether your application sends duplicate creation calls.
- Contact support with the error details.
Sandbox overview
Learn how to create and manage Blaxel sandboxes.
Sandbox best practices
Review recommended patterns for reliable sandbox workloads.