AcManager.Tools.Profile.PlayerStatsWebServer.PlayerStatsController.HandleError C# (CSharp) Method

HandleError() protected method

protected HandleError ( HttpListenerContext context, Exception ex, int statusCode = 500 ) : bool
context System.Net.HttpListenerContext
ex System.Exception
statusCode int
return bool
            protected bool HandleError(HttpListenerContext context, Exception ex, int statusCode = 500) {
                var errorResponse = new {
                    Title = "Unexpected Error",
                    ErrorCode = ex.GetType().Name,
                    Description = ex.ExceptionMessage(),
                };

                context.Response.StatusCode = statusCode;
                return context.JsonResponse(errorResponse);
            }
        }
PlayerStatsWebServer.PlayerStatsController