pepsico-ecommerce / snowflex

elixir snowflake client
Apache License 2.0
52 stars 10 forks source link

ODBC error is not always a string #53

Closed eaguilera23 closed 2 years ago

eaguilera23 commented 2 years ago

:odbc.connect returns {:error, Reason}, but Reason isn't guaranteed to be something that is stringable. A very common example would be hitting the file/process limit on OSX, which throws {:emfile, [...]}. This leads to the case statement throwing a ((Protocol.UndefinedError) protocol String.Chars not implemented for...) which is a bit of a red herring.

Tossing an inspect on the log line here would make it easier to debug the underlying issue, especially the first time you come across it.

Closes #36

Ch4s3 commented 2 years ago

thanks @eaguilera23. Stay tuned for some upcoming larger improvements.