Closed jvf closed 4 years ago
How are you using DBConnection? The error tuple is usually controlled by whatever is wrapping DBConnection. So if you are using Ecto, the tuple is for validations and so on.
I am using DBConnection through Xandra.
The error tuple is usually controlled by whatever is wrapping DBConnection.
Do I understand you correctly: DBConnection always throws, i.e. if I see it wrapped in en error tuple this has to come Xandra?
Exactly!
Thank you for explaining!
Due to a crash of the database server I see lots of (concurrent) queries failing with
%DBConnection.ConnectionError{message: "connection not available and request was dropped from queue ...}
. In some of the cases the ConnectionError is returned as an:error
tuple and in other cases the error is raised by DBConnection. Is this intended by behaviour? If so, what does returning an:error
tuple vs raising indicate?