ncw / swift

Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)
MIT License
310 stars 107 forks source link

ObjectCreate() 404 return is wrongly interpreted as ObjectNotFound instead of ContainerNotFound #169

Open sblaisot opened 3 years ago

sblaisot commented 3 years ago

According to swift doc PUT request on object (object creation) returns 404 if container is not found

If the container for the object does not already exist, the operation returns the 404 Not Found response code.

ObjectCreate() function is currently mapped against objectErrorMap here so ncw/swift interprets 404 on object PUT as ObjectNotFound instead of ContainerNotFound which is confusing.