carbon-io / carbond

MIT License
2 stars 5 forks source link

Unique index throws error instead of responding with 409 #234

Open tfogo opened 6 years ago

tfogo commented 6 years ago

If Mongo responds with MongoError: E11000 duplicate key error, an error is thrown. Do we want to add something to MongoDBCollection to catch this and respond with a 409 (Conflict) error instead of a 500?