refactor: to return the result according to the RFC 7807 standard and add a traceId
This commit is contained in:
@ -1,22 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Mirea.Api.Dto.Responses;
|
||||
|
||||
/// <summary>
|
||||
/// A class for providing information about an error
|
||||
/// </summary>
|
||||
public class ErrorResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The text or translation code of the error. This field may not contain information in specific scenarios.
|
||||
/// For example, it might be empty for HTTP 204 responses where no content is returned or if the validation texts have not been configured.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public required string Error { get; set; }
|
||||
/// <summary>
|
||||
/// In addition to returning the response code in the header, it is also duplicated in this field.
|
||||
/// Represents the HTTP response code.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public required int Code { get; set; }
|
||||
}
|
Reference in New Issue
Block a user