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

Improve error handling #348

Merged
merged 15 commits into from
Oct 22, 2021
Merged

Conversation

maxekman
Copy link
Member

@maxekman maxekman commented Oct 21, 2021

Description

Improve errors by:

  • Providing more details such as aggregate ID, version, related events etc.
  • Printing of more detailed error information.
  • Providing operations for errors to DRY up error descriptions.
  • Use fmt.Errorf() to wrap errors instead of BaseErr.
  • Return errors as pointers.
  • Use errors.As/Is where possible.
  • Remove unneeded error vars.

Affected Components

  • All errors.

Related Issues

Fixes #284
Fixes #286

Solution and Design

Steps to test and verify

@maxekman maxekman changed the title Issue-284 / Improve error details Improve error handling Oct 21, 2021
@coveralls
Copy link

coveralls commented Oct 21, 2021

Coverage Status

Coverage decreased (-1.0%) to 68.321% when pulling 139df9a on maxekman:ISSUE-284/remove-base-err into d45655a on looplab:main.

@maxekman maxekman mentioned this pull request Oct 22, 2021
@maxekman maxekman merged commit 62691c9 into looplab:main Oct 22, 2021
@maxekman maxekman deleted the ISSUE-284/remove-base-err branch October 22, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Errors structs should be returned as pointers Remove BaseErr from errors
2 participants