Skip to content

refactoring: SRP violation on event dispatch and missing error handling #16

@rluders

Description

@rluders

https://github.com/Gierdiaz/diagier-clinics/blob/2a25ce9ee9d96132431604dbb9ab091527d75205/internal/domain/patient/service.go#L47-L50

I see two issues here:

  1. Event dispatch should be in a separated structure, or method;
  2. What happens if the event isn't triggered? Do you plan to recover it? Register it? Retry?
    2.1. Also, for event and marshal: Error needs to be managed, not suppressed or just logged;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions