fix: include function call args in recording_handler exception_handler - #104
Open
tabedzki wants to merge 1 commit into
Open
fix: include function call args in recording_handler exception_handler#104tabedzki wants to merge 1 commit into
tabedzki wants to merge 1 commit into
Conversation
When a workflow function decorated with exception_handler fails (e.g. an insert during modality preingestion), the resulting error message and Slack notification only contained the exception traceback, with no indication of which recording/arguments triggered it. This adds a format_call_args helper that builds a truncated repr of the call's args and kwargs, printed to console and prepended to error_exception so it propagates to RecordingLog and Slack error notifications. Assisted-by: ClaudeCode:claude-sonnet-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Human guided, AI assisted PR (using this skill). AI text below. 🤖
Summary
When a workflow function wrapped by
exception_handlerinu19_pipeline/automatic_job/recording_handler.pyfails (e.g. an insert duringelectrophysiology_preingestion/imaging_preingestion), the resulting error message and Slack notification only contained the exception traceback — with no indication of which recording or arguments triggered it.This adds a
format_call_argshelper that builds a truncated (2000-char) repr of the failing call'sargs/kwargs. It's printed to console and prepended toerror_info['error_exception'], so it propagates through toRecordingHandler.update_recording_log(therecording.LogStatustable) and the Slack error notification, making it possible to see which recording/query_keyan insert failed on.Test plan
config), confirming the failing call's args now appear inerror_message/error_exception.ast.parse.recording_handler.py; manual verification against the running pipeline is recommended before merge.Assisted-by: ClaudeCode:claude-sonnet-5