diff --git a/src/openflexure_microscope_server/things/camera_stage_mapping.py b/src/openflexure_microscope_server/things/camera_stage_mapping.py index 30fb7d10..ab6d4058 100644 --- a/src/openflexure_microscope_server/things/camera_stage_mapping.py +++ b/src/openflexure_microscope_server/things/camera_stage_mapping.py @@ -207,9 +207,13 @@ class CameraStageMapper(Thing): result: dict = calibrate_backlash_1d( tracker, move, direction_array, logger=logger ) - except (InvocationCancelledError, MappingError) as e: + except InvocationCancelledError as e: + logger.info("User cancelled the camera stage mapping calibration") logger.info("Returning to starting position") stage.move_absolute(**starting_position, block_cancellation=True) + except MappingError as e: + logger.info("Returning to starting position due to failed calibration") + stage.move_absolute(**starting_position, block_cancellation=True) raise e result["move_history"] = move.history result["image_resolution"] = hw.grab_image().shape[:2]