question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding list of undefined parameter names to the 'Bind parameters must not contain undefined' error message

See original GitHub issue

Currently 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:open
  • Created 10 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
theirongiantcommented, Nov 22, 2022

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 be Bind parameters must not contain undefined (indexes 0, 1). To pass SQL NULL specify JS null

0reactions
sidorarescommented, Nov 22, 2022

something similar to this message:

image

I remember some time ago that reading 'test' was not in the error message

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found