Skip to main content

ConflictError (409) and "Worker stopped responding"

What a 409 ConflictError means and what to do when a command fails because a sandbox is paused, ended or stopped.

S
Written by Sanjay Senthilkumar

A 409 means your request conflicts with the current state of the sandbox. In the TypeScript SDK it raises a ConflictError, for example when the sandbox is paused or has ended.

What to do

  1. Read the sandbox's current state: get the sandbox, or list your sandboxes.

  2. If it is paused, resume it and run the command again.

  3. If it has ended (stopped, or its timeout ran out), start a new sandbox. A stopped sandbox cannot be brought back; its disk is deleted. Take a snapshot before stopping if you want to keep files.

  4. Do not retry a 409 unchanged. It will answer the same.

If you see a message that a worker stopped responding

Treat the sandbox as unavailable. Check its state as above and start a new sandbox if it has ended. If new sandboxes also fail, wait a little and try again, because 5xx errors are worth retrying with backoff.

If it keeps happening, email [email protected] with:

  • The sandbox ID, the region and the template

  • The request_id from the error (it matches the X-Request-ID response header)

  • What you were doing and when, with a time zone

Docs: Errors.

Did this answer your question?