diff --git a/backend/api/Controllers/MissionSchedulingController.cs b/backend/api/Controllers/MissionSchedulingController.cs index 1406720d..24bd1e86 100644 --- a/backend/api/Controllers/MissionSchedulingController.cs +++ b/backend/api/Controllers/MissionSchedulingController.cs @@ -129,6 +129,10 @@ [FromBody] ScheduleMissionQuery scheduledMissionQuery { return NotFound("Mission definition not found"); } + else if (missionDefinition.InspectionArea == null) + { + logger.LogWarning("Mission definition with ID {id} does not have an inspection area when scheduling", missionDefinition.Id); + } try { await localizationService.EnsureRobotIsOnSameInstallationAsMission(robot, missionDefinition); } catch (InstallationNotFoundException e) { return NotFound(e.Message); }