Protocols currently use different pattern to handle errors.
Light push uses error code while filter uses exception.
It is best for the user if a common pattern is used across the API.
Also, there is an opportunity to re-use error code across the codebase and have similar pattern on the user side to handle them
Solution
Use the same enum that is used for LightPush, for Metadata
Rename SendError to ProtocolError to be more accomodating
Problem
Protocols currently use different pattern to handle errors. Light push uses error code while filter uses exception.
It is best for the user if a common pattern is used across the API. Also, there is an opportunity to re-use error code across the codebase and have similar pattern on the user side to handle them
Solution
SendError
toProtocolError
to be more accomodatingNotes
Contribution checklist:
!
in title if breaks public API;