Rename InsertObjectFailedException.Request to Procedure
Updated ExceptionHandlingMiddleware to use the new Procedure property name when logging InsertObjectFailedException. Changed error title for BadRequestException to "Bad Procedure". Removed unused System.Text.Json using directive from InsertObjectProcedure.cs.
This commit is contained in:
@@ -66,7 +66,7 @@ public class ExceptionHandlingMiddleware
|
||||
context.Response.StatusCode = (int)HttpStatusCode.BadRequest;
|
||||
details = new()
|
||||
{
|
||||
Title = "Bad Request",
|
||||
Title = "Bad Procedure",
|
||||
Detail = badRequestEx.Message
|
||||
};
|
||||
break;
|
||||
@@ -109,9 +109,9 @@ public class ExceptionHandlingMiddleware
|
||||
case InsertObjectFailedException insertFailedEx:
|
||||
logger.LogError(
|
||||
insertFailedEx,
|
||||
"Insert operation failed during request processing. {request}",
|
||||
"Insert operation failed during request processing. {procedure}",
|
||||
JsonSerializer.Serialize(
|
||||
insertFailedEx.Request,
|
||||
insertFailedEx.Procedure,
|
||||
options: new() { WriteIndented = true }
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user