decred / dcrtime

Decred anchored timestamp client, proxy, and server.
ISC License
28 stars 23 forks source link

Abstract error handling on requests handler functions #86

Open tiagoalvesdulce opened 1 year ago

tiagoalvesdulce commented 1 year ago

As Luke mentioned here: https://github.com/decred/dcrtime/pull/84#discussion_r1021767766.

We are handling erros individually for each route which generates a lot of boilerplate. Ideally we would abstract this behavior to make the code simpler and more readable.