flask_accepts icon indicating copy to clipboard operation
flask_accepts copied to clipboard

Fix error aggregation and body=None

Open tsweeney-dust opened this issue 3 years ago • 1 comments

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.

tsweeney-dust avatar May 20 '21 22:05 tsweeney-dust

Thanks - can you update to address test failures prior to merge?

apryor6 avatar Jun 06 '21 19:06 apryor6