Module
Nodetrout.Internal.Error
- Package
- purescript-nodetrout
- Repository
- nsaunders/purescript-nodetrout
This module contains error-related types and logic.
#select Source
select :: HTTPError -> HTTPError -> HTTPError
Given two HTTPError
values, determines the best response based on priority
or, when equal by priority, status code. The router assigns a lower priority
based on route specificity/depth so that the error presented to the client
is the one that is easier to resolve.