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

refactor(encoder): make errors private #539

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

muktihari
Copy link
Owner

@muktihari muktihari commented Mar 13, 2025

After careful consideration, I decide to make sentinel errors into private errors. I don't think we can use it to take a specific action with those errors, I think it's uncommon and maybe on special case only. For example, ErrInvalidWriter is actually not needed since user can just check the writer before passing to the encoder. Next case is ErrMissingDeveloperDataId, users are expected to write good fit's messages, having that error does not help users to take specific action since users still need to edit fit's messages before proceeding again.

@muktihari muktihari self-assigned this Mar 13, 2025
@muktihari muktihari added this to the v0.25.0 milestone Mar 13, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9f2ccc3) to head (f2fe5aa).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #539   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         4596      4596           
=========================================
  Hits          4596      4596           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muktihari muktihari merged commit 79df704 into master Mar 13, 2025
5 checks passed
@muktihari muktihari deleted the refactor/encoder-make-errors-private branch March 13, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants