public IHttpActionResult GetUserPosts(int userId) { try { var posts = _postsSvc.GetPostsByUser(userId) ?? new List<Post>(); return Ok(posts); } catch (Exception ex) { _errorSignaler.SignalFromCurrentContext(ex); return BadRequest(); } }