Use errorCode/SQLState from Java exceptions in stack signatures (case-insensitive @ext lookup)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
调研方向
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 内容生成。
描述
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
@extkeys case-insensitively (StringComparer.OrdinalIgnoreCase), soerrorCodematchesErrorCode. - Also use
SQLStatewhen present (sqlStatefrom JDBC;SqlStatefromNpgsql.PostgresExceptionandMySqlExceptionon .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 小时
- 30 天内合并 PR
- 40
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
exceptionless/Exceptionless 的其他 Issue
-
bug documentation
难度 2/5 1-3 小时 新手友好度 78/100
exceptionless/Exceptionless#2707 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 85/100
exceptionless/Exceptionless#2706 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
exceptionless/Exceptionless#2705 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
exceptionless/Exceptionless#2704 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 73/100
exceptionless/Exceptionless#2703 ·
维护者通常 1 天内回复
查看 exceptionless/Exceptionless 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
MahdiyarGHD/GheychiApp#39 ·
维护者通常 1 天内回复
-
bug effort:S P3
难度 2/5 1-3 小时 新手友好度 76/100
nightscout/nocturne#3136 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 76/100
GameShowLDA/AskMkiM#1075 ·
维护者通常 1 天内回复