Skip to content

Conversation

@lloeki
Copy link
Member

@lloeki lloeki commented Oct 22, 2025

Why?

  • If an exception happens after telemetry has been sent but before returning from main's begin..end block, two telemetry events may be emitted, which contradicts the "one start" => "one conclusion" design.
  • context.status could raise exceptions in some situations
  • guard.call may raise an exception but that's very unlikely

What does this PR do?

  • tighten exception catching around injection in main
  • prevent telemetry from bubbling an exception up (we can't do anything in this case anyway)
  • add exception handling around context evaluation and guardrail checks

How to test the change?

CI

Additional Notes:

@lloeki lloeki marked this pull request as ready for review October 22, 2025 14:58
@lloeki lloeki requested a review from a team as a code owner October 22, 2025 14:58
@lloeki lloeki marked this pull request as draft October 22, 2025 14:58
If an exception happens after telemetry has been sent but before
returning from `main`'s `begin`..`end` block, two telemetry events may
be emitted, which contradicts the "one start" => "one conclusion"
design.

Therefore:
- tighten exception catching around injection in `main`
- prevent telemetry from bubbling an exception up (we can't do anything
  in this case anyway)
@lloeki lloeki force-pushed the lloeki/improve-exception-handling branch from 5f62a26 to 48eaf0e Compare October 29, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants