Preview not found response with a 404 status means the requested preview has been deleted or is being deleted. Check the lifecycle state of both the parent sandbox and the preview.
Common causes
This error occurs when:- The parent sandbox was deleted manually
- The parent sandbox expired because of its TTL
- The preview’s TTL expired
- An asynchronous deletion request placed the preview in the
DELETINGstate
Resolve the error
Create previews withcreateIfNotExists in TypeScript or create_if_not_exists in Python. When a preview is in the DELETING state, the platform waits for deletion to finish before recreating it. These methods safely reuse preview IDs and avoid a race with deletion.
Also verify that the sandbox and preview are still active and were not removed by TTL expiration or manual cleanup.
Prevent future errors
- Handle
404responses gracefully in your application - Poll the sandbox status periodically where appropriate
- Configure sandbox TTL values that match your usage pattern
Preview URLs
Learn how to create and use sandbox previews.
Sandbox overview
Review sandbox lifecycle and configuration.