EYBlockchain / nightfall_3

a mono-repo containing an optimistic version of nightfall
Creative Commons Zero v1.0 Universal
260 stars 57 forks source link

(nightfall-client) removes res.json for error case #1417

Closed LijuJoseJJ closed 1 year ago

LijuJoseJJ commented 1 year ago

What does this implement/fix? Explain your changes.

This PR do a small refactor nightfall-client api routes. some routes were explicitly doing response send via res.json event though error object is passed to common error handler middleware in common-files/utils/httputils.mjs file. which will cause error such as response is already send, also sever logic written in common error handler would not have worked for these APIs