[x] Submit to the develop branch instead of master
Description:
Add the ability to return custom status codes from our custom exceptions. This will make it easier to handle and display errors in origin-dapp.
Updated some of the status codes (e.g. 429 for rate limiting errors)
Include the handler in the try/except block in handle_request to allow validation errors to be raised in logic. Not all validation errors are known at schema load. E.g. an API request to an external service reveals that some data is malformed.
Change the default status code for validation errors to 400
Return an object on validation errors rather than a string. The keys are field names and the values are errors that occurred validating that field. This is to enable the display of validation errors alongside fields in origin-dapp, see e.g. [Issue #152] of origin-dapp https://github.com/OriginProtocol/origin-dapp/issues/152.
Checklist:
autopep8 --in-place --recursive --a --a .
develop
branch instead ofmaster
Description: