diff --git a/Mortein/Controllers/CommandController.cs b/Mortein/Controllers/CommandController.cs index fb9aee5..c0c4fcf 100644 --- a/Mortein/Controllers/CommandController.cs +++ b/Mortein/Controllers/CommandController.cs @@ -96,11 +96,18 @@ public IActionResult ToggleDeviceVibration(Guid deviceId) [ProducesResponseType(StatusCodes.Status204NoContent)] public IActionResult VibrateDeviceForDuration(Guid deviceId, int seconds) { - PublishCommand(deviceId, new VibrateForDurationCommand() + try + { + PublishCommand(deviceId, new VibrateForDurationCommand() + { + DeviceId = deviceId, + Seconds = seconds, + }); + return NoContent(); + } + catch { - DeviceId = deviceId, - Seconds = seconds, - }); - return NoContent(); + return Problem(); + } } }