diff --git a/Mortein/Controllers/CommandController.cs b/Mortein/Controllers/CommandController.cs index a0a48bb..fb9aee5 100644 --- a/Mortein/Controllers/CommandController.cs +++ b/Mortein/Controllers/CommandController.cs @@ -68,11 +68,18 @@ private static string ConstructTopicName(Guid deviceId) [ProducesResponseType(StatusCodes.Status204NoContent)] public IActionResult ToggleDeviceVibration(Guid deviceId) { - PublishCommand(deviceId, new ToggleVibrationCommand() + try { - DeviceId = deviceId, - }); - return NoContent(); + PublishCommand(deviceId, new ToggleVibrationCommand() + { + DeviceId = deviceId, + }); + return NoContent(); + } + catch + { + return Problem(); + } } ///