[BUG] Statement execute thrown exception doesn't populate the odbcErrors array
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- database
調査の方向性
Statement.execute() のパスから開始し、unixODBC のトレースを使用して、提供された prepare、bind、execute のシーケンスを DB2 for i に対して実行し、失敗を再現します。実行中に利用できる ODBC 診断情報とスローされたエラーを比較します。完了の条件は、エラーの odbcErrors 配列にステートメントの失敗を説明する情報が含まれていることです。
索引モデルが issue の本文から書いたものです。
説明
Describe your system
odbcPackage Version: 2.4.9- ODBC Driver: 1.1.0.28-0
- unixODBC 2.3.9
- Database Name: DB2 for i
- Database Version: V7R5M0
- Database OS: IBM i
- Node.js Version: 18.18.2
- Node.js OS: IBM i
Describe the bug
The error doesn't contain the odbcErrors data. console.log of the error in a catch block will give you
[Error: [odbc] Error executing the statement] { odbcErrors: [] }
Expected behavior
odbcErrors to have the information about what caused the error
To Reproduce
Steps to reproduce the behavior:
- Run the node.js code below:
Code
try {
const connection = await odbc.connect(my_connection_string);
const statement = await connection.createStatement();
let bindVal = [
field1 || '',
field2 || '']
await statement.prepare(`UPDATE MYLIB.MYTABLE
SET
FIELD1 = ?
WHERE FIELD2 = ?`);
await statement.bind(bindVal);
const result = await statement.execute();
} catch (error) {
console.log(error);
const odbc_error = error?.odbcErrors || 'No ODBC error object';
console.log(odbc_error)
const odbc_error_message = error?.odbcErrors?.[0]?.message || 'No ODBC error message';
console.log(odbc_error_message)
}
Additional context
Checked the following table to find out what the error was but couldn't find anything there either:
qsys2.history_log_info
qsys2.joblog_info
https://github.com/IBM/node-odbc/issues/389 - @harsh-savvient mentioned this issue
https://github.com/IBM/node-odbc/issues/363 - @mikemicmike also raised this issue Dec 21, 2023 and @FredoMartini confirmed it March 1, 2024 and the robot closed the issue May 30, 2024 as stale
https://github.com/IBM/node-odbc/issues/30
- 主要言語
- JavaScript
- スター
- 159
- フォーク
- 92
- 平均マージ
- 5時間 59分
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IBM/node-odbc のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
security
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
[Bug] Sybase ASE: Encoding issue (works in msnodesqlv8, fails in node-odbc with \x1A artifacts)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
`yarn vitest:update` (documented) throws locally; local Cypress scripts target an unserved portオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rescript-lang/rescript-lang.org#1415 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: agent capture drops long Unicode text as punctuation対応中かも @ktz03 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
volcengine/OpenViking#5801 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Deepak3699/Ai_Mentor#244 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nextcloud/collectives#2843 ·
メンテナーはふだん 1 日以内に返信