示例#1
0
        public ActionResult <IEnumerable <ErrorDTO> > GetById([FromRoute] int id)
        {
            try
            {
                var response = _errorManager.GetById(id);

                return(Ok(response));
            }
            catch (ErrorNotFoundException)
            {
                return(NotFound("Error not found"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }