diff --git a/src/nsls2api/api/v1/beamline_api.py b/src/nsls2api/api/v1/beamline_api.py index 95f5d7b5..e250554d 100644 --- a/src/nsls2api/api/v1/beamline_api.py +++ b/src/nsls2api/api/v1/beamline_api.py @@ -112,7 +112,7 @@ async def add_or_delete_detector( if new_detector is None: raise HTTPException( status_code=409, - detail=f"Detector {detector.name} already exists in beamline {name}", + detail=f"Detector already exists in beamline {name} with either name '{detector.name}' or directory name '[detector.directory_name}'", ) changed_detector = new_detector