-
Notifications
You must be signed in to change notification settings - Fork 54
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
better error reporting when parsing queries #24
Comments
What, you don't like a good Clojure NullPointerException hunt? Ha, just kidding! I've actually run into this myself transitioning from Yesql. I'll add in a validation check for this and get it into the next release. Thanks for the report! |
fantastic! 👍 |
This is released in 0.4.3. The strategy at this point is to give a little bit of context about which header keys it did find and to dump the sql template. Since the parser is generically picking up HugSQL headers (it doesn't expect |
great, I think we can close this one unless you want to keep it here for the later enhancement part :) |
I was translating some queries from yesql, and I ended up having a typo where the name key looked like
-- :name:
, it took me a little bit to track it down since the stack shows:It would be good to validate the required metadata and error out explicitly if stuff like function name couldn't be parsed. Could even print the query string since it should be in context. :)
The text was updated successfully, but these errors were encountered: