Esempio n. 1
0
        public async Task Invoke(HttpContext context)
        {
            try
            {
                await _next.Invoke(context);
            }
            catch (Exception ex)
            {
                context.Response.StatusCode = 500;

                string json = ExceptionUtility.GetExceptionJson(ex);
                await context.Response.WriteAsync(json);
            }
        }