poanetwork / poa-popa

DApp for proof of physical address (PoPA) attestation for validators of POA Network
https://popa.poa.network
GNU General Public License v3.0
24 stars 18 forks source link

(Refactor) Return 200 status on responses with errors #182

Closed phahulin closed 6 years ago

phahulin commented 6 years ago

When there is an error during workflow execution that is caught and processed by the server, server should return HTTP 200 code. It also makes UI error messages more readable. At the present moment it returns 400 if response.ok == false.

It first appeared in https://github.com/poanetwork/poa-popa/pull/80#discussion-diff-175150603R9 but somehow got merged anyway. Tests are passing because tests part was not merged and they don't rely on status code.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 549


Totals Coverage Status
Change from base Build 539: -0.09%
Covered Lines: 1020
Relevant Lines: 1238

💛 - Coveralls