image_in_use
HTTP 409 This image is in use by a server
What happened
You asked to delete an image that one of your servers is using right now, and the detail field says which case it is. An ISO image is inserted into a server's drive: deleting the file would leave that drive pointing at something that no longer exists. A server image is the source of a server that is being created or reinstalled at this moment: deleting it would break that server's build.
What to do
For an ISO image, eject it with `DELETE /v1/servers/{id}/iso` on the server that holds it, then repeat the same request. For a server image, wait until the server that is being built from it leaves the `creating` state or finishes its reinstall (follow its task), then repeat the same request; this response carries Retry-After: 30, the shortest sensible pause before the repeat. The ISO case has no Retry-After: waiting does not eject the image.
Retrying
Change the state this refers to, then repeat the same request with the same idempotency key.
How it arrives
{
"type": "https://docs.fiberax.com/errors/image_in_use",
"title": "This image is in use by a server",
"status": 409,
"code": "image_in_use",
"request_id": "a277dcd1ca652c65"
}
Branch your code on code, never on the wording of title.