ardalis / ardalis/Result

Critical error does not report the correlation id

Open
#240 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

While using the library (thanks, btw), I was struck by the fact that despite `CorrelationId` being set, it is not reported by the `ToActionResult` extension method when converting a `CriticalError` result object. Is there a specific reason behind this? I'm using critical errors to capture unchecked exceptions, and it would be nice to let the user see their request id, especially for troubleshooting purposes.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the ToActionResult extension method's handling of CriticalError results and compare it with how CorrelationId is handled for other result types. Confirm the expected HTTP response behavior and add coverage for a CriticalError with a set CorrelationId; done means the converted response reports that request identifier.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.