Adding list of undefined parameter names to the 'Bind parameters must not contain undefined' error message
See original GitHub issueCurrently the error message shown is:
Error: Bind parameters must not contain undefined. To pass SQL NULL specify JS null
I’ve added some code to list which named parameters are undefined so the error message becomes:
Error: Bind parameters must not contain undefined (:id, :email). To pass SQL NULL specify JS null
Contributing guidelines says it’s best to start an issue on changes before creating a PR so thought I’d mention here to see if it’s of interest.
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
MYSQL2 PROBLEM: TypeError: Bind parameters must not ...
This error is pretty much self explanatory. Bind parameters must not contain undefined. To pass SQL NULL specify JS null. You need to...
Read more >Bind parameters must not contain undefined when passing ...
I get the following error when I bind to a parameter with an integer variable with the value of 0. TypeError: Bind parameters...
Read more >bind parameters must not contain undefined
MYSQL2 PROBLEM: TypeError: Bind parameters must not contain undefined. ... I've added some code to list which named parameters are undefined so the...
Read more >Bind parameters must not contain undefined. To pass SQL ...
Coding example for the question MYSQL2 PROBLEM: TypeError: Bind parameters must not contain undefined. To pass SQL NULL specify JS null-node.js.
Read more >Solved: Error Message_'The API operation does not contain
Solved: I am trying to update the file (in step#4) that I get it from (step#2) which is I get it from SharePoint...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah that’s the idea, got it working for array parameters now as well. I’ll run some tests to make sure that there are no bugs and can create a PR for it.
So for named parameters the error message will be
Bind parameters must not contain undefined (parameters: :id, :email). To pass SQL NULL specify JS null
and for array parameters it will beBind parameters must not contain undefined (indexes 0, 1). To pass SQL NULL specify JS null
something similar to this message:
I remember some time ago that
reading 'test'
was not in the error message