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

Use errorCode/SQLState from Java exceptions in stack signatures (case-insensitive @ext lookup)

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, java, mysql, postgresql
領域
backend, databases

調査の方向性

Start with src/Exceptionless.Core/Utility/ErrorSignature.cs, especially AddSpecialCaseDetails around lines 202–213, and inspect how it reads @ext keys. Check the existing signature tests for coverage of Number and ErrorCode, then add cases for camelCase keys and SQLState. Done when those values distinguish relevant database error signatures and existing cases still pass.

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

説明

enhancement

Problem

ErrorSignature.AddSpecialCaseDetails adds Number and ErrorCode from an error's extended data (@ext) to the signature, so database errors with different codes get different stacks: ErrorSignature.cs#L202-L213.

The lookup is case-sensitive and only knows the .NET property names. The Java client sends exception properties under their Java bean names. So for java.sql.SQLException, @ext contains errorCode and sqlState, neither of which matches. For example, a MySQL duplicate-key error (errorCode 1062) and a deadlock (errorCode 1213) thrown from the same repository method end up in the same stack.

Proposal

  • Look up @ext keys case-insensitively (StringComparer.OrdinalIgnoreCase), so errorCode matches ErrorCode.
  • Also use SQLState when present (sqlState from JDBC; SqlState from Npgsql.PostgresException and MySqlException on .NET). It's the portable error class across JDBC drivers and makes useful signatures for Postgres errors.

Notes

  • This changes the signature hash for errors that carry these properties, so existing stacks for them will split once.
  • The client could rename the keys instead, but a case-insensitive server lookup covers every client (Java, Kotlin, and anything else that sends camelCase) without special cases.

Context: exceptionless/Exceptionless.Java#91

主要言語
C#
スター
2.5k
フォーク
508
平均マージ
2日 17時間
マージ済み PR(30日)
40

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

exceptionless/Exceptionless のほかの issue

exceptionless/Exceptionless の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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