public IActionResult Delete(int collectionId, int feedId) { try { var currentUserId = int.Parse(User.Identity.Name); _feedService.Delete(collectionId, feedId, currentUserId); return(Ok()); } catch (ValidationException ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } }