-
Notifications
You must be signed in to change notification settings - Fork 99
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
Wrong queries causes unhandled exceptions #161
Comments
quick and dirty solution is to tyr/catch the call to |
@regevbr , would you like to submit a PR? Thanks. |
@dhmlau sure, which solution would you prefer? |
@regevbr Thank you for willing to submit a patch, I think you can start with try catch the error for |
Sounds good! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
I have encountered this error and have a unique perspective on the cause. In my case one of the parameters is a very large Buffer. The assert statement always appends the parameters even if the assertion is true and the parameters are never displayed. |
Steps to reproduce
Run a select query (
all()
) with order by on a bogus field that includes?
char in ithttps://github.com/strongloop/loopback-connector/blob/deb461ea62e6226f053774fb10c1f023d6061f8c/lib/sql.js#L1455-L1459
Current Behavior
an unhandled exception caused by the
buildSelect()
method due toParameterizedSQL
class assertion error:https://github.com/strongloop/loopback-connector/blob/deb461ea62e6226f053774fb10c1f023d6061f8c/lib/parameterized-sql.js#L38-L42
Which in turn means that the callback is never called, causing connections to hang
Expected Behavior
cb()
should be called with the proper errorThe text was updated successfully, but these errors were encountered: