prosopo/provider

return HTTP 400 on encountering error in provider due to bad data

Closed this issue · 0 comments

E.g. rather than throwing an error which would halt the provider, we should return a 400 error indicating bad request. For example, currently, errors are thrown if the signature is invalid or dapp is not registered when trying to submit a captcha to the provider. This should return a HTTP 400 rather than throwing an error. There are several other places which throw an error when they should return a 400 or 500 HTTP code.