Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 7e25b7f

Browse files
committed
Refactoring
1 parent ac01c42 commit 7e25b7f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
namespace NET6CustomLibrary.ExceptionsMiddleware;
2+
3+
public record ExcMidResponse(string ErrorCode, string ErrorStatus, object ErrorMessage, string StackTrace = null);

src/NET6CustomLibrary/ExceptionsMiddleware/ExceptionResult.cs renamed to src/NET6CustomLibrary/ExceptionsMiddleware/ExcMidResult.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace NET6CustomLibrary.ExceptionsMiddleware;
22

3-
internal class ExceptionResult
3+
internal class ExcMidResult
44
{
55
public HttpStatusCode ErrorCode { get; set; }
66
public string ErrorStatus { get; set; }

src/NET6CustomLibrary/ExceptionsMiddleware/GlobalErrorHandlingMiddleware.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private static Task HandleExceptionAsync(HttpContext context, Exception exceptio
6161
//stackTrace = exception.StackTrace;
6262
}
6363

64-
var exceptionResult = JsonSerializer.Serialize(new ExceptionResult()
64+
var exceptionResult = JsonSerializer.Serialize(new ExcMidResult()
6565
{
6666
ErrorStatus = errorStatus,
6767
ErrorCode = errorCode,

0 commit comments

Comments
 (0)