Skip to content

Commit 49e41b8

Browse files
authored
Add logging for foil hole registration debugging (#442)
1 parent 8e02e7f commit 49e41b8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/murfey/client/contexts/spa.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,11 @@ def post_transfer(
785785
foil_hole: Optional[int] = self._position_analysis(
786786
transferred_file, environment, source, machine_config
787787
)
788-
except Exception:
788+
except Exception as e:
789789
# try to continue if position information gathering fails so that movie is processed anyway
790+
logger.warning(
791+
f"Unable to register foil hole for {str(file_transferred_to)}. Exception: {str(e)}"
792+
)
790793
foil_hole = None
791794

792795
preproc_url = f"{str(environment.url.geturl())}/visits/{environment.visit}/{environment.murfey_session}/spa_preprocess"

src/murfey/server/api/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,11 @@ async def request_spa_preprocessing(
11351135
.one()[0]
11361136
.id
11371137
)
1138-
except Exception:
1138+
except Exception as e:
1139+
log.warning(
1140+
f"Foil hole ID not found for foil hole {sanitise(str(proc_file.foil_hole_id))}: {e}",
1141+
exc_info=True,
1142+
)
11391143
foil_hole_id = None
11401144
if proc_params:
11411145

0 commit comments

Comments
 (0)