Skip to content

Preserve the primary hook failure during shutdown#35

Open
wallacelim wants to merge 1 commit into
langfuse:mainfrom
wallacelim:fix/preserve-conversion-error
Open

Preserve the primary hook failure during shutdown#35
wallacelim wants to merge 1 commit into
langfuse:mainfrom
wallacelim:fix/preserve-conversion-error

Conversation

@wallacelim

Copy link
Copy Markdown

Problem

With fail_on_error=true, a rollout-conversion failure is thrown from the hook's try block. If telemetry shutdown then also fails in finally, the shutdown error replaces the original conversion error, hiding the root cause.

Change

Capture both failures while still always attempting shutdown, then rethrow the conversion failure first. A shutdown-only failure continues to propagate, and the default fail-open behavior is unchanged.

This is intentionally separate from usage accounting (#28), hook path portability (#33), and service-tier pricing (#34).

Validation

  • corepack pnpm@9.5.0 test — 36 passing
  • corepack pnpm@9.5.0 run lint — Prettier, TypeScript, and generated-bundle checks pass

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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