Skip to content

No DTO for error responses - inconsistent error contract #28

@al2devph

Description

@al2devph

Description

Errors return raw strings (exception.Message) with no consistent structure. API consumers have no reliable error response format to parse.

Affected Files

  • All controllers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    architecturalStructural and design issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions