Skip to content

Tech debt: Untyped Map<String, Object> in API error responses #324

@Brad-Edwards

Description

@Brad-Edwards

Description

Three API response DTOs use List<Map<String, Object>> for error/failure details, making the API contract opaque and unvalidatable by clients:

  • BulkStatusTransitionResponse.failedList<Map<String, Object>>
  • ImportResultResponse.errorsList<Map<String, Object>>
  • SyncResultResponse.errorsList<Map<String, Object>>

Clients cannot know what keys to expect in these maps. API documentation generators (OpenAPI/Swagger) cannot describe the shape.

Recommendation: Create typed error records (e.g., BulkFailureDetail, ImportError, SyncError) with explicit fields.

Location: BulkStatusTransitionResponse.java, ImportResultResponse.java, SyncResultResponse.java

Traced Requirements

  • GC-A012: Dual API Exposure

Impact

API usability — clients must guess at error response structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt and code quality improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions