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

FormatErrorMessage() private method

private FormatErrorMessage ( Exception exception, System.Guid handlingInstanceId ) : string
exception System.Exception
handlingInstanceId System.Guid
return string
            private string FormatErrorMessage(Exception exception, Guid handlingInstanceId)
            {
                var pattern = this.message ?? exception.Message;

                if (this.appendHandlingId)
                {
                    pattern = string.Format(
                        CultureInfo.InvariantCulture,
                        "{0}. [Error ID: {{handlingInstanceID}}]",
                        pattern.Trim(' ', '.'));
                }

                var error = ExceptionUtility.FormatExceptionMessage(pattern, handlingInstanceId);
                return error;
            }
ApiContainerExtension.HttpErrorExceptionHandler