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.

Am Freitag, 1. Juli 2016 09:04:22 UTC+2 schrieb Thomas Weiss:
>
> Hi Kaveh,
>
> We must be running different versions because I get a status code 500 with 
> the following body: {"error":true,"errorNum":500,"errorMessage":"Internal 
> Server Error","code":500,"exception":"ArangoError 1210: unique constraint 
> violated","stacktrace":[...]}
>
> That's testing with 3.0.0 on Windows btw, not Ubuntu.
>
> Thanks,
> Thomas
>
> On Friday, July 1, 2016 at 2:51:32 PM UTC+8, Kaveh Vahedipour wrote:
>>
>> Hi Thomas,
>>
>>
>> this is what I am getting with 3.0 when I violate the uniqueness 
>> constraint. 
>>
>> {"error":true,"errorMessage":"cannot create document, unique constraint 
>> violated","code":409,"errorNum":1210}
>>
>>
>> Could you provide us with a little more detail, plz.
>>
>>
>> Kind regards,
>>
>> Kaveh
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to