Description
Errors return raw strings (exception.Message) with no consistent structure. API consumers have no reliable error response format to parse.
Affected Files
Suggested Fix
Create an ErrorResponseDto with properties like StatusCode, Message, Details and return structured error objects from all endpoints. Use ProblemDetails (built into ASP.NET Core) for standardized error responses.
Severity: Medium
Description
Errors return raw strings (
exception.Message) with no consistent structure. API consumers have no reliable error response format to parse.Affected Files
Suggested Fix
Create an
ErrorResponseDtowith properties likeStatusCode,Message,Detailsand return structured error objects from all endpoints. UseProblemDetails(built into ASP.NET Core) for standardized error responses.Severity: Medium