what http response code for rest service on put method when domain rules invalid -
What is the most appropriate response code to return to using a PUT method for updating a resource, and in the request Some data included can invalidate domain rules?
For example, in a customer resource, the name should be specified. If an agent tries to issue PUT without supplying an name then I do not want to update the resource, and I want to tell the caller that they name .
What HTTP response code?
The response code is not related to http. In this case, the method should return the same status code such as This was a post request. I can say that you use 400
or 409
( note: see more discussion about the difference between two in comments ) needed.
Comments
Post a Comment