in this code, the Conflict portion will never be reached b/c the error is non-nil... but if i put reverse the checking... I might return a 409-Conflict when I should have returned a 500- internal-server-error
Hrm, gonna have to think on that for a few. Plus i have a three year old asleep on me right now.
But I am pondering!
Silly question, is the response nil when the err is not?
no the response always is non-nil no matter what happens with the err
Sorry, it's been a heck of a day. Central VA, so tornados and blah. Anyways, if there's an error and a response, can use the counts to see if anything was changed iirc. Or, on failure, do another query to see what's there. Should tell you if there's an error between app and db or the error was due to it existing already
On a side note, freaking tornadoes in Virginia. Eesh
Yeah the tornadoes came thru NC also...
So it seems to me like there should be an explicit way of determining if a conflict has caused the insert to fail...
The only way I see how to check for a conflict is to parse the error message:
Duplicate primary key id:
^^ Wouldn't returning a specific error value from the RunWrite() method or in the WriteResponse be the appropriate way of determining this?
I went ahead an opened an issue
I think typed errors would be fantastic, doing a type switch to handle these would be much clearer
Hi, just a little message to thank you for the gorethink driver it is awesome :+1:
Please use #gorethink on the RethinkDB slack from now on. I will be removing the link from the repo shortly
My reasoning behind this change is that notifications in gitter are not great and the slack has got a pretty good community there now. Sorry for any trouble this causes
Hi guys. Got a quick question. Is there a way to see what ReQL queries are being executed in rethinkDB?
hi guys , got a question , how to update data in rethinkdb from the router