I think you're both on the same version (3).
Inserting a document with a uniqueness violation via the HTTP API returns:
HTTP/1.1 409 Conflict
Server: ArangoDB
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
Content-Length: 109
{"error":true,"errorMessage":"cannot create document, unique constraint violated","code":409,"errorNum":1210}
whereas when the uniqueness violation is triggered from inside a Foxx service, the response is:
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Server: ArangoDB
Connection: Keep-Alive
Content-Length: 1135
{"error":true,"errorNum":500,"errorMessage":"Internal Server Error","code":500,"exception":"ArangoError 1210: unique constraint violated","stacktrace":["ArangoError: unique constraint violated","..."]}
So there is indeed a difference in response status codes. I am not sure if this is intentional, probably it is not. Need to find out.