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.

Error messages too generic

See original GitHub issue

Hi there,

When executing a query which results in a database error (e.g. if there is something wrong with the syntax of the query), the odbc package does throw an exception as expected. The exception does contain a very generic error message however.

Example:

const statement = await connection.createStatement();
await statement.prepare("select * from nonexistingtable");
await statement.execute();

I expect the abovementioned code to throw this error message: Invalid object name 'nonexistingtable'.

Yet, node-odbc throws this error message [odbc] Error executing the statement

Is there any way to retrieve the error which caused the exception thrown by node-odbc?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
markdirishcommented, Apr 28, 2020

Yep, this was an error with Promises calling new Error(), which was deleting all of the ODBC error information. Fixed in this PR, available on 2.3.0 beta branch (coming to a release branch soon!)

0reactions
MrTeapotcommented, Jan 17, 2020

@markdirish Hey, what do you think about this? Is it a fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the recommended wording for a generic error message
With generic error message I mean a message for an error that has occured but there are no details on what the error...
Read more >
Generic Error - Oracle Help Center
In cases where a transaction fails, the API Gateway can use a Generic Error to convey error information to the client based on...
Read more >
Generic Error Codes
Error Code Message Explanation ‑30110 Column not known or not in table A column referenced in a statement is not fou... ‑31000 Statement syntax error...
Read more >
**HOW TO TROUBLESHOOT** the generic error 'An ... - IBM
Cause. This is a generic error message. Therefore there are a large number of different potential causes: Scenario #1 - The Controller SQL...
Read more >
Why are error or warning messages so generic and ... - Quora
An error message (from a compiler) indicates a problem with the program text that is so severe that it prevents generation of code...
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