Skip to content

unhandledrejection #996

Open
Open
@huineng

Description

ibm_db 3.2.4. node 20.12.2

i was doing some development as usual using some
try { await conn.query(sql,bindings) } catch (err) { throw err} (or Promise.reject)

the problem was that i by mistake provided for bindings [['string']] instead of ['string']

So i got my rejecting and this had a message like

stack: Error: Wrong param format!
   at /node_modules/ibm_db/lib/odbc.js:677:19
   at SimpleQueue.next (/node_modules/ibm_db/lib/simple-queue.js:34:5)
   at SimpleQueue.maybeNext (/node_modules/ibm_db/lib/simple-queue.js:22:10)
   at SimpleQueue.push (/node_modules/ibm_db/lib/simple-queue.js:15:8)
   at Database.query (/node_modules/ibm_db/lib/odbc.js:520:14)

i guess this is from this line

Nan::ThrowError("Wrong param format!");

fine

But then i got also a unhandledrejection with reason

reason: Error: [IBM][CLI Driver] CLI0123E  SQL data type out of range. SQLSTATE=HY004

so it looks to me the code doesn't stop at the first error

thanks

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions