diff --git a/api/command.py b/api/command.py index e48a732..82d72fb 100644 --- a/api/command.py +++ b/api/command.py @@ -271,8 +271,11 @@ def execute_delete_command(name: str, cs: ChangeSet) -> ChangeSet: def execute_batch_commands(name: str, cs: ChangeSet) -> ChangeSet: result = ChangeSet() + todo = {} + try: for op in cs.operations: + todo = op operation = op['operation'] if operation == API_ADD: result.merge(execute_add_command(name, ChangeSet(op))) @@ -281,6 +284,7 @@ def execute_batch_commands(name: str, cs: ChangeSet) -> ChangeSet: elif operation == API_DELETE: result.merge(execute_delete_command(name, ChangeSet(op))) except: + print(f'ERROR: Fail to execute {todo}!') pass return result