Amss.Boilerplate.Api.Configuration.ApiContainerExtension.HttpErrorExceptionHandler.HandleException C# (CSharp) Method

HandleException() public method

public HandleException ( Exception exception, System.Guid handlingInstanceId ) : Exception
exception System.Exception
handlingInstanceId System.Guid
return System.Exception
            public Exception HandleException(Exception exception, Guid handlingInstanceId)
            {
                var error = this.FormatErrorMessage(exception, handlingInstanceId);

                var result = new HttpError(error, exception)
                    {
                        StatusCode = this.statusCode
                    };
                if (!string.IsNullOrEmpty(this.errorCode))
                {
                    result.ErrorCode = this.errorCode;
                }

                return result;
            }
ApiContainerExtension.HttpErrorExceptionHandler