From 449da09d2f616be524c8702922df798f13d08fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Chirico=20Indreb=C3=B8?= Date: Thu, 12 Dec 2024 10:38:17 +0100 Subject: [PATCH] Avoid logging error when media config not found --- backend/api/Controllers/MediaStreamController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/api/Controllers/MediaStreamController.cs b/backend/api/Controllers/MediaStreamController.cs index 963d00d23..090c8af8c 100644 --- a/backend/api/Controllers/MediaStreamController.cs +++ b/backend/api/Controllers/MediaStreamController.cs @@ -41,10 +41,10 @@ public async Task> GetMediaStreamConfig([FromRoute] st var config = await isarService.GetMediaStreamConfig(robot); return Ok(config); } - catch (Exception e) + catch (Exception) { - logger.LogError(e, "Error during GET of media stream config from ISAR"); - throw; + logger.LogWarning("No ISAR media config retrieved from robot with ID {id}", id); + return NotFound($"No media config retrieved for robot with ID {id}"); } } }