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 force-pushed the ISSUE-284/remove-base-err branch from 220c853 to 4b0a827 Compare October 21, 2021 15:15
@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 force-pushed the ISSUE-284/remove-base-err branch from 4b0a827 to a923df4 Compare October 22, 2021 07:29
@maxekman maxekman force-pushed the ISSUE-284/remove-base-err branch from a923df4 to 3c632db Compare October 22, 2021 08:43
@maxekman maxekman force-pushed the ISSUE-284/remove-base-err branch from 3c632db to 220c3de Compare October 22, 2021 09:13
@maxekman maxekman force-pushed the ISSUE-284/remove-base-err branch from d25a8d2 to 139df9a Compare October 22, 2021 11:08
@maxekman maxekman force-pushed the ISSUE-284/remove-base-err branch from 7917d26 to 9e62bdf Compare October 22, 2021 13:00
@maxekman maxekman force-pushed the ISSUE-284/remove-base-err branch from 9e62bdf to 139df9a Compare October 22, 2021 13:02
@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