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

fix(message-handler): Rewire promise rejections as Error objects and #300

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

mirceanis
Copy link
Member

@mirceanis mirceanis commented Dec 14, 2020

fixes #294

The actual fix is renaming the error event to ev_err instead of error.

During this fix, I also "standardised" the way errors are thrown or rejections called.
The bottom line is always use an Error object.
It makes things more consistent and also easier to test.

This will be enforced with a rule like no-throw-literal when we turn linting back on.

@mirceanis mirceanis added this to the DAF 7.0 milestone Dec 14, 2020
@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #300 (c7f932c) into beta (07fcb76) will increase coverage by 0.25%.
The diff coverage is 46.15%.

@@            Coverage Diff             @@
##             beta     #300      +/-   ##
==========================================
+ Coverage   65.27%   65.53%   +0.25%     
==========================================
  Files          63       64       +1     
  Lines        1552     1555       +3     
  Branches      242      242              
==========================================
+ Hits         1013     1019       +6     
+ Misses        444      441       -3     
  Partials       95       95              

Copy link
Contributor

@simonas-notcat simonas-notcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@mirceanis mirceanis merged commit 04446d4 into beta Dec 14, 2020
@mirceanis mirceanis deleted the bugfix/294-event-emitter-error-channels branch December 14, 2020 21:43
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

Successfully merging this pull request may close these issues.

None yet

2 participants