Re: 409 Conflict - exposing more details

Julian.

On Feb 14, 2011, at 5:02 PM, Julian Reschke wrote:

> Hi,
> 
> in a project I'm currently working on, my server returns 409 Conflict when trying to DELETE a resource that still has strong references from other resources -- so what I want to tell the client is that you can't DELETE resource A as long as resource B references it.
> 
> Now, with close coupling between client and server this can easily be communicated in the response body, be it JSON or XML.
> 
> However, I was wondering whether this use case is common enough to standardize it? Maybe with a link relation?

Not sure. I think I would try to model the aggregate in a way that the parts (that cannot exist without the whole) have URIs that are below the aggregate's URI. That way, they are automatically 'removed'. Part-whole relations being synonymous for your 'strong reference'.

So it is maybe more a design problem than a technical one?

Jan


> 
> Best regards, Julian
> 

Received on Monday, 14 February 2011 18:34:32 UTC

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant