When you use the REST API to change a resource's name, and pick a name that is already used by another resource, you get a 500 error in response.
sbenthall: What if there is a layer name collision?
jdeolive: The current implementation will return a 500. But this is a bug. It should handle this case and return a 403.