question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WriteException: Message isn't clear on what went wrong

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
jkoneckicommented, Dec 30, 2020

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 Jakub. 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! 🎄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Eveneum/Eveneum/issues/18#issuecomment-752717360, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRNDZQHDCU7QCEDTFGQQDSXNW5VANCNFSM4VA7UJAA .

0reactions
ThomasVandenboncommented, Dec 30, 2020

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! 🎄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found