Table Create is silently dying
Closed this issue · 2 comments
leolorenzoluis commented
Hi,
Given I have a list of strings that is my basis for table creation, it silently dies
Enum.each(result, fn x -> db("testdatabase") |> table_create(x["SampleKey"]) |> run end)
It was able to create some tables but it didn't create all of them. I suspect it silently died without throwing. Should this raise an exception?
Also, is there a way to use the '!' so that I get real exception?
hamiltop commented
You should be checking the response. This is related to #90
Right now you should match against a %RethinkDB.Response{"tables_created" => 1}
. If you do that, it will raise ArgumentError
if a table fails.
leolorenzoluis commented
Ahh, good point. Yes I shall do that, and I agree that it should return atom instead of struct. Thank you for your fast response and sorry for opening an issue.