WriteException: Message isn't clear on what went wrong
See original GitHub issueI’m using Eveneum in Azure and have noticed that you can’t really tell what has gone wrong when a WriteException
occurs via Application Insights.
Example of a WriteException
Event time | 12/10/2020, 11:25:25 AM (Local time) |
---|---|
Message | Exception of type ‘Eveneum.WriteException’ was thrown. |
Exception type | Eveneum.WriteException |
Failed method | Eveneum.EventStore+<WriteToStream>d__25.MoveNext |
Severity level | Error |
Telemetry type | exception |
Problem Id | Eveneum.WriteException at Eveneum.EventStore+<WriteToStream>d__25.MoveNext |
Assembly | Eveneum, Version=4.6.0.0, Culture=neutral, PublicKeyToken=null |
In contrast here is an example of an OptimisticConcurrencyException
where the Message
for each exception of this type clearly indicates the problem.
Event time | 12/10/2020, 11:25:27 AM (Local time) |
---|---|
Message | Expected stream ‘Removed stream id’ to have version 190 but was 191. |
Exception type | Eveneum.OptimisticConcurrencyException |
Failed method | Eveneum.EventStore+<WriteToStream>d__25.MoveNext |
Severity level | Error |
Telemetry type | exception |
Problem Id | Eveneum.OptimisticConcurrencyException at Eveneum.EventStore+<WriteToStream>d__25.MoveNext |
Assembly | Eveneum, Version=4.6.0.0, Culture=neutral, PublicKeyToken=null |
I’ve gone through the Application Insights logs and I can’t find the StatusCode
of the WriteException
or a more descriptive Message
anywhere.
Am I blind, or is something going wrong for these exceptions?
Note: I’d like to tell you more about the circumstances in which this WriteException
occurs, but sadly that’s what I’m trying to figure out 😅
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
How to write a good exception message
The "error" message should clearly and succinctly state what went wrong and what, if anything, the user can do to recover from the...
Read more >How to write an error message when you don't know what ...
Be specific about the error. The user should know exactly what kind of error has occurred to avoid confusion or irritation.
Read more >Console displays exception message but is still wrong ...
EmptyBagException and exception with message a string containing "There are no items in the bag!") I am not sure why this is so...especially ......
Read more >Do you end your exception messages with a period? [closed]
The text of the Message property should completely describe the error and, when possible, should also explain how to correct the error.
Read more >The Art of the Error Message. How to write clear, helpful ...
A lot of error messages are vague. Really vague. When possible, be clear about what's going on. Give the right amount of detail,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, this is just to add extra properties for any logs for CosmosException. No particular reason, just wanted to piggy back on the work for the other initializer.
In some of my projects I’m using Cosmos SDK for persisting projections, and this initializer may be handy there as well.
On Wed, 30 Dec 2020, 18:32 ThomasVandenbon, notifications@github.com wrote:
Sorry for the delay @jkonecki Today I’ve upgraded to
4.8.0
and I’ve included the second telemetry initializer along with the first.I’ve had a look through Application Insights and I can’t see any
CosmosException
in our logging in the past month. Out of curiosity: Are you hoping to target a specific scenario for these CosmosExceptions or is it more of a precaution?Happy hollidays to you too! 🎄