Refactor project files for improved readability and structure
- Cleaned up whitespace in Directory.Build.props and Directory.Packages.props for consistency. - Reformatted project file references in PnvPanel.Api.csproj for better clarity. - Enhanced code readability in various endpoint files by adjusting line breaks and indentation. - Standardized method signatures and improved formatting in ResultExtensions and multiple endpoint classes for better maintainability.
This commit is contained in:
@@ -14,10 +14,21 @@ public sealed record Error(string Code, string Message, ErrorType Type = ErrorTy
|
||||
{
|
||||
public static readonly Error None = new(string.Empty, string.Empty);
|
||||
|
||||
public static Error Validation(string code, string message) => new(code, message, ErrorType.Validation);
|
||||
public static Error NotFound(string code, string message) => new(code, message, ErrorType.NotFound);
|
||||
public static Error Conflict(string code, string message) => new(code, message, ErrorType.Conflict);
|
||||
public static Error Unauthorized(string code, string message) => new(code, message, ErrorType.Unauthorized);
|
||||
public static Error Forbidden(string code, string message) => new(code, message, ErrorType.Forbidden);
|
||||
public static Error Failure(string code, string message) => new(code, message, ErrorType.Failure);
|
||||
public static Error Validation(string code, string message) =>
|
||||
new(code, message, ErrorType.Validation);
|
||||
|
||||
public static Error NotFound(string code, string message) =>
|
||||
new(code, message, ErrorType.NotFound);
|
||||
|
||||
public static Error Conflict(string code, string message) =>
|
||||
new(code, message, ErrorType.Conflict);
|
||||
|
||||
public static Error Unauthorized(string code, string message) =>
|
||||
new(code, message, ErrorType.Unauthorized);
|
||||
|
||||
public static Error Forbidden(string code, string message) =>
|
||||
new(code, message, ErrorType.Forbidden);
|
||||
|
||||
public static Error Failure(string code, string message) =>
|
||||
new(code, message, ErrorType.Failure);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user