There is not failure - you get the correct HTTP Response for your request. There a topic on stack overflow on what is the best HTTP response if the object already exists:
400 => "The request could not be understood by the server due to malformed syntax". And the server understands perfectly, but is unable to comply due to a conflict. There is nothing wrong with the request & syntax, only a data problem.
Since POST is "INSERT" operation - 400 is an "appropriate" response in case if an object already exists.