Enhanced the ExceptionHandlingMiddleware to handle DataIntegrityException explicitly. Added a new `using` directive for `ReC.Application.Common.Exceptions` to support this change. When a DataIntegrityException is caught, the middleware now sets the HTTP status code to 409 Conflict and returns the exception's message. Also updated the default case to ensure unhandled exceptions are logged and return a generic error message with a 500 Internal Server Error status code.
ReC
Description
Languages
C#
100%