public async Task <ActionResult> CheckMoveAsync(string roomId) { var login = GetLogin(); if (login == null) { return(Unauthorized()); } try { var result = await _roundService.CheckMoveAsync(login, roomId); if (result == null) { return(NotFound()); } return(Ok(result)); } catch (MoveException ex) { return(BadRequest(ex.Message)); } catch (RoomConnectionException ex) { return(BadRequest(ex.Message)); } catch (GameFinishedException ex) { await _sessionService.FinishSessionAsync(roomId); return(Conflict(ex.Status.ToString())); } }