Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature: Throw proper errors

オープン
#3,380 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, postgresql
領域
backend, databases

調査の方向性

packages/pg/test/integration/client/connection-timeout-tests.js から始め、特にリンクされたエラーハンドリングの例を確認し、周辺の client のエラーパスを見直してください。既存の実装に基づいて、標準となるエラーの動作と影響を受けるシナリオを定義してください。呼び出し元がメッセージテキストを照合せずに関連するエラーを確実に区別できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

feature request

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

brianc/node-postgres のほかの issue

brianc/node-postgres の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。