Beispiel #1
0
        public async Task <IActionResult> Get(short page = 1, short count = 10)
        {
            try
            {
                return(Ok(await _hackernewsService.GetNewStories(page, count)));
            }
            catch  //(Exception ex)
            {
                //Add loggin functionality here to log the stack trace for support purposes  ex

                return(StatusCode(StatusCodes.Status500InternalServerError, "Server Error"));
            }
        }