Esempio n. 1
0
        public async Task <IActionResult> Get()
        {
            try
            {
                var webHooks = await _registrationsManager.GetWebHooksAsync(User, RemovePrivateFilters);

                return(Ok(webHooks));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message, ex);
                return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message));
            }
        }
        public async Task <IActionResult> Get()
        {
            try
            {
                var webHooks = await _registrationsManager.GetWebHooksAsync(User, RemovePrivateFilters);

                return(Ok(webHooks));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message, ex);
                throw;
            }
        }
Esempio n. 3
0
        public async Task <IEnumerable <WebHook> > Get()
        {
            try
            {
                IEnumerable <WebHook> webHooks = await _registrationsManager.GetWebHooksAsync(User, RemovePrivateFilters);

                return(webHooks);
            }
            catch (Exception ex)
            {
                Configuration.DependencyResolver.GetLogger().Error(ex.Message, ex);
                HttpResponseMessage error = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message, ex);
                throw new HttpResponseException(error);
            }
        }