Feature: Throw proper errors
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, postgresql
調査の方向性
packages/pg/test/integration/client/connection-timeout-tests.js から始め、特にリンクされたエラーハンドリングの例を確認し、周辺の client のエラーパスを見直してください。既存の実装に基づいて、標準となるエラーの動作と影響を受けるシナリオを定義してください。呼び出し元がメッセージテキストを照合せずに関連するエラーを確実に区別できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Current modern practice for the Node ecosystem is to inherit from Error and use the .code property to distinguish between errors. node-postgres does not. Like many today, we experienced an issue with Supabase downtime. And so we've started to look at how we can make our error handling in certain scenarios more robust.
Here's an example of how we currently have to track/check for errors: https://github.com/brianc/node-postgres/blob/732580782ffa2f9299f7112ff27cfa4534cd22f3/packages/pg/test/integration/client/connection-timeout-tests.js#L82-L86
Documentation for error.code https://nodejs.org/docs/v22.14.0/api/errors.html#errorcode
The error.code property is a string label that identifies the kind of error. error.code is the most stable way to identify an error. It will only change between major versions of Node.js. In contrast, error.message strings may change between any versions of Node.js.
At the least, it would be really nice to have canonical errors that we could easily look for and react to.
- 主要言語
- JavaScript
- スター
- 13.2k
- フォーク
- 1.4k
- 平均マージ
- 6日 15時間
- マージ済み PR(30日)
- 6
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
brianc/node-postgres のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
brianc/node-postgres#3770 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
brianc/node-postgres#3716 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
brianc/node-postgres#3631 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
brianc/node-postgres#2857 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
brianc/node-postgres#2433 ·
メンテナーはふだん 1 日以内に返信
brianc/node-postgres の issue をすべて見る
似ている issue
-
status: waiting triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
freeCodeCamp/freeCodeCamp#70412 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Jason-Vaughan/TangleClaw#1884 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue web
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/TypeScript#64453 ·
メンテナーはふだん 1 日以内に返信
-
self-driving
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信