Skip to content

Commit

Permalink
Fix error message for scheduling in unknown area
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed May 13, 2024
1 parent 385195b commit f2c1f9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/api/Controllers/MissionSchedulingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ [FromBody] ScheduledMissionQuery scheduledMissionQuery
.Select(t => stidService.GetTagArea(t.TagId, scheduledMissionQuery.InstallationCode).Result)
.ToList();
}
catch (AreaNotFoundException) { return NotFound("Area not found"); }
catch (Exception e) when (e.InnerException is AreaNotFoundException)
{
return NotFound(e.InnerException.Message);
}

Deck? missionDeck = null;
foreach (var missionArea in missionAreas)
Expand Down

0 comments on commit f2c1f9a

Please sign in to comment.