kriasoft / universal-router

A simple middleware-style router for isomorphic JavaScript web apps
https://www.kriasoft.com/universal-router/
MIT License
1.7k stars 104 forks source link

Catch any rejections using errorHandler option #156

Closed frenzzy closed 5 years ago

frenzzy commented 6 years ago

Alternative solution for #154 and #152

If your or third-party code calls Promise.reject(nonErrorObject) router will wrap up the result into Error object and call errorHandler anyway.

codecov-io commented 6 years ago

Codecov Report

Merging #156 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #156   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         147    149    +2     
  Branches       44     45    +1     
=====================================
+ Hits          147    149    +2
Impacted Files Coverage Δ
src/UniversalRouter.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 494bddd...d9d0c60. Read the comment docs.