47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| // ***********************************************************************
 | |
| // <copyright file="HttpErrorDto.cs">
 | |
| //     Heath
 | |
| // </copyright>
 | |
| // ***********************************************************************
 | |
| 
 | |
| using Lib.Common.LoggingAPI.Service.Constants;
 | |
| using System.ComponentModel;
 | |
| using System.Text.Json.Serialization;
 | |
| 
 | |
| namespace Lib.Common.LoggingAPI.Service.DataTransferObjects.Error
 | |
| {
 | |
|     /// <summary>
 | |
|     /// The service HTTP error data transfer object.
 | |
|     /// </summary>
 | |
|     public class HttpErrorDto
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// Gets or sets the error.
 | |
|         /// </summary>
 | |
|         [DisplayName(DisplayNames.Error)]
 | |
|         [JsonPropertyName(DisplayNames.Error)]
 | |
|         public ErrorDetailsDto Error { get; set; }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Creates a new instance of <see cref="HttpErrorDto{TMessage}"/>
 | |
|         /// with custom parameters.
 | |
|         /// </summary>
 | |
|         /// <param name="message">The HTTP error message.</param>
 | |
|         /// <param name="errorCode">The HTTP error code.</param>
 | |
|         /// <param name="target">The HTTP error target.</param>
 | |
|         public HttpErrorDto(
 | |
|             string? message,
 | |
|             string? errorCode,
 | |
|             string? target)
 | |
|         {
 | |
|             this.Error = new ErrorDetailsDto
 | |
|             {
 | |
|                 ErrorCode = errorCode,
 | |
|                 Message = message,
 | |
|                 Target = target,
 | |
|             };
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | 
