← Back to the changelog
EnhancementWeb AppLive Sessions

Public API returns 404 for deleted labels and prompts

Label and prompt writes that point at something no longer there now answer with a clear status code, so your integration can tell a bad request from a server problem.

If you build against the Chief public API, a delete or detach on a label that was already gone came back as a 500. Your client had no way to tell whether it had asked for something that did not exist or whether Chief had broken, and retrying got you nowhere.

Label deletes and detaches

Deleting a label that no longer exists now answers 404. Detaching a label from an asset it was never attached to answers 404 as well, and so does repeating a detach that already went through. Before, that repeat came back as a success even though nothing changed.

Chief-managed labels

Deleting a label that Chief manages answers 409 with a message saying the label cannot be changed. It used to answer 500 and ask you to try again later, which no retry could ever satisfy.

Stored prompt deletes

Deleting a stored prompt that was already deleted used to answer 204 and stamp the record again, so the original record of who deleted it and when got overwritten by a second tab, a retry, or a stale list. You now get 404, matching what updating or starring a deleted prompt already returns.

The OpenAPI spec documents the 404 and 409 responses for these endpoints, so you can code against them directly.