Probably 405 'method not allowed' or just return a generic 400 'bad
request'. In either case you know it is your client fault.
Wikipedia is a good start for most common codes. You can see you can
cover a lot of use cases just with the codes on that page.
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
2015-01-17 11:56 GMT+01:00 Karsten Hilbert <Karsten.Hilbert at gmx.net>:
> On Sat, Jan 17, 2015 at 11:37:52AM +0100, Diego Bosc? wrote:
>
>> The thing is that as long as a code is returned, you know that the
>> server is up and has given you a response based on your request. By
>> the code you can tell you more things.
>> 2xx messages tell you that the request was a success
>> 4xx messages tell you that there was a client error
>> 5xx messages tell you that there was a server error
>>
>> On your example 404 is correct because your client requested to delete
>> an non existing resource, which is a client error.
>
> What would be the error code for when the client attempts to
> call a non-existing service on the server ?
>
>>>> For example: DELET /demographics/party/{partyId}
>
> or
>
>>>> For example: DELETE /demographics/pardy/{partyId}
>
> Karsten
> --
> GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
>
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at lists.openehr.org
> http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org