veres-one / did-veres-one

A Decentralized Identifier utility library for Veres One
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

DRY Up Error handling for HTTPError #66

Open aljones15 opened 3 years ago

aljones15 commented 3 years ago

There are multiple places in this library where there are similar error handling statements:

https://github.com/veres-one/did-veres-one/blob/69e371ec0a14ac645f6c498a012114b4edf19f26/lib/VeresOneClient.js#L117-L134

https://github.com/veres-one/did-veres-one/blob/69e371ec0a14ac645f6c498a012114b4edf19f26/lib/VeresOneClient.js#L187-L204

Create a helper function to handle them.