{"action":"opened","issue":{"url":"https://api.github.com/repos/hellerstanislav/eve-mongoengine/issues/15","labels_url":"https://api.github.com/repos/hellerstanislav/eve-mongoengine/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/hellerstanislav/eve-mongoengine/issues/15/comments","events_url":"https://api.github.com/repos/hellerstanislav/eve-mongoengine/issues/15/events","html_url":"https://github.com/hellerstanislav/eve-mongoengine/issues/15","id":56772244,"number":15,"title":"unique constraint returns 500 instead of 409","user":{"login":"blurrcat","id":2245575,"avatar_url":"https://avatars.githubusercontent.com/u/2245575?v=3","gravatar_id":"","url":"https://api.github.com/users/blurrcat","html_url":"https://github.com/blurrcat","followers_url":"https://api.github.com/users/blurrcat/followers","following_url":"https://api.github.com/users/blurrcat/following{/other_user}","gists_url":"https://api.github.com/users/blurrcat/gists{/gist_id}","starred_url":"https://api.github.com/users/blurrcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blurrcat/subscriptions","organizations_url":"https://api.github.com/users/blurrcat/orgs","repos_url":"https://api.github.com/users/blurrcat/repos","events_url":"https://api.github.com/users/blurrcat/events{/privacy}","received_events_url":"https://api.github.com/users/blurrcat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-06T05:32:48Z","updated_at":"2015-02-06T05:32:48Z","closed_at":null,"body":"If a field has a `unique` constraint, Eve would return 500 if a duplicate value is submitted, instead of 409.\r\nI think this also applies to other constraints as well, since Eve only catches exceptions raised by PyMongo, not by MongoEngine.\r\n\r\nIs there any chance that this can be fixed?"}}