Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,680 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, java, mysql, postgresql
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C#
Stelle
2.5k
Fork
508
Merge medio
2g 17h
PR unite (30g)
40

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di exceptionless/Exceptionless

Tutte le issue di exceptionless/Exceptionless

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.