public async Task <IActionResult> Lookup(string id)
        {
            try
            {
                var webHook = await _registrationsManager.LookupWebHookAsync(User, id, RemovePrivateFilters);

                if (webHook != null)
                {
                    return(Ok(webHook));
                }
                return(NotFound());
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message, ex);
                throw;
            }
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> Lookup(string id)
        {
            try
            {
                WebHook webHook = await _registrationsManager.LookupWebHookAsync(User, id, RemovePrivateFilters);

                if (webHook != null)
                {
                    return(Ok(webHook));
                }
                return(NotFound());
            }
            catch (Exception ex)
            {
                Configuration.DependencyResolver.GetLogger().Error(ex.Message, ex);
                HttpResponseMessage error = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message, ex);
                throw new HttpResponseException(error);
            }
        }