public async Task <IActionResult> AddFeedback([FromBody] FeedbackViewModel feedbackViewModel) { if (ModelState.IsValid) { var feedbackObject = _modelFactory.CreateFeedback(feedbackViewModel); try { var feedbackEntry = await _dataStore.AddFeedback(feedbackObject); return(CreatedAtRoute("SubmitFeedback", feedbackEntry)); } catch (InvalidGameSessionException) { return(BadRequest(Responses.INVALID_GAME_SESSION_ID)); } catch (InvalidPlayerIDException) { return(BadRequest(Responses.INVALID_PLAYER_ID)); } catch (DuplicateFeedbackException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { return(BadRequest(ex.Message)); } } else { return(BadRequest(Responses.INVALID_FEEDBACK_INPUTS)); } }