Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rluders opened this issue Sep 26, 2024 · 0 comments
Open

Comments

@rluders
Copy link

rluders commented Sep 26, 2024

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant