New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message for empty argument to :csv ? #442
Comments
It can't, because filter You should instead check |
Yes, that was my work-around. It would have been easier to identify the error with a more specific message though. If there are cases in which |
There are plenty, as the filter is generic, it is used in many places, not just for |
Related issue on StackOverflow: https://stackoverflow.com/questions/48344888/best-practice-for-creating-sql-select-queries-while-handling-potential-undefined |
More on this question: WHERE col IN Query with empty array as parameter |
I have a query like this:
When
titles
is[]
, the error message is quite confusing:This is the error forwarded from the underlying
pg
library, but perhapspg-promise
could provide a better error for this scenario?Something like...
(Related: brianc/node-postgres#1079)
The text was updated successfully, but these errors were encountered: