Skip to content

Close issue #195#479

Open
dotsdl wants to merge 1 commit intomainfrom
claude/close-issue-195-BmajA
Open

Close issue #195#479
dotsdl wants to merge 1 commit intomainfrom
claude/close-issue-195-BmajA

Conversation

@dotsdl
Copy link
Member

@dotsdl dotsdl commented Jan 10, 2026

This commit implements the changes requested in issue #195 to improve error handling and tracking in the alchemiscale system.

Changes:

  1. Added optional 'reason' field to Task model to store error tracebacks or user-provided reasons for state changes

  2. Updated statestore methods (set_task_error, set_task_invalid, set_task_deleted) to accept and store the reason parameter

  3. Added error handling around ProtocolDAG creation in compute service:

    • Catches exceptions during transformation.create()
    • Sets task to error status with exception traceback as reason
    • Prevents compute service crashes
  4. Added new API endpoint POST /tasks/{task_scoped_key}/error to set task error status with reason for creation-time failures

  5. Added corresponding client method set_task_error()

  6. Updated existing set_task_result endpoint to pass failure reasons when setting tasks to error after execution failures

Closes #195

This commit implements the changes requested in issue #195 to improve
error handling and tracking in the alchemiscale system.

Changes:
1. Added optional 'reason' field to Task model to store error tracebacks
   or user-provided reasons for state changes

2. Updated statestore methods (set_task_error, set_task_invalid,
   set_task_deleted) to accept and store the reason parameter

3. Added error handling around ProtocolDAG creation in compute service:
   - Catches exceptions during transformation.create()
   - Sets task to error status with exception traceback as reason
   - Prevents compute service crashes

4. Added new API endpoint POST /tasks/{task_scoped_key}/error to set
   task error status with reason for creation-time failures

5. Added corresponding client method set_task_error()

6. Updated existing set_task_result endpoint to pass failure reasons
   when setting tasks to error after execution failures

Closes #195
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.

Set Task to error upon failure to create a ProtocolDAG from a Transformation; add reason field and populate it

2 participants