flask_accepts
flask_accepts copied to clipboard
Fix error aggregation and body=None
Two bugs noticed (may not be real bugs).
When no body is present (i.e. request.get_json()
returns None
) the schema is presented None
to load from, whereas an empty JSON body could better be interpreted as {}
. For a body schema with no required fields this leads to better behavior.
Error aggregation doesn't seem to have been working correctly, as error.data['errors']
never existed, and comment "If any parsing produced an error, combine them and reraise" hints this was the intended behavior.
Thanks - can you update to address test failures prior to merge?