Skip to content

Log the job traceback only for real errors, so a user cancel no longer shows up in the log as a crash - #338

Open
happyarts wants to merge 1 commit into
kaixxx:mainfrom
happyarts:fix/cancel-log-traceback
Open

Log the job traceback only for real errors, so a user cancel no longer shows up in the log as a crash#338
happyarts wants to merge 1 commit into
kaixxx:mainfrom
happyarts:fix/cancel-log-traceback

Conversation

@happyarts

Copy link
Copy Markdown
Contributor

When the user cancels a running transcription, the cancel is transported out of the queue-pump loop as an exception. The job-level handler already distinguishes it from real errors (the job is counted as canceled, not failed), but it then unconditionally logged the message as an error followed by Job error details: with a full traceback — so a deliberate cancel looked like a crash in the log file and on stdout.

This splits the handler: a user cancel now logs only the cancellation message, while real errors keep the full error message and traceback exactly as before.

Observed log before the change (user cancel):

Job error details: Traceback (most recent call last):
  ...
  File "noScribe/main.py", line 3566, in _run_engine_subprocess_stream
    raise Exception(t('err_user_cancelation'))
Exception: <localized user-cancel message>

The summary at the end was already correct (canceled: 1, failed: 0); only the logging changes.

🤖 Generated with Claude Code

…r shows up in the log as a crash

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant