Skip to content

Refactor service/repository layers to validate single organization/party lookup #640

@coderabbitai

Description

@coderabbitai

Context

During the review of PR #639, it was identified that the controller layer currently throws an InvalidOperationException when multiple parties are found for a single organization number (see DashboardUserContactInformationController).

This validation logic should be moved from the controller to the service/repository layers to ensure proper separation of concerns and consistent error handling across the application.

Expected Behavior

The service/repository layers should enforce that only a single party is returned for a given organization number, handling multiple-party scenarios gracefully at that layer rather than in the controller.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions