We have two objects named Track and Walkthru . They are connected to each other through TrackWalkthruAssociation . If a Track and Walkthru are connected to each other (i.e. there is an instance of TrackWalkthruAssociation linking them together), none of them can be deleted if the TrackWalkthruAssociation instance that links them together is deleted first .
So send DELETE to /tracks/1 or /walkthrus/1 , for example, when an association exists, the failure should fail. What is the appropriate HTTP response code for? I do not want to return 500 because this is not an unexpected condition.
source share