Add a warning if validation errors are suppressed
We can't be certain that the user doesn't know what they're doing in
this case. It's conceivable that they have a validation hook which
doesn't raise an error and they're prepared for `parse()` to return
`None`. However, in that case, it would be beneficial to at least emit
a warning, because this is likely to confuse users.
resolves #518
Stephen Rosen
3 years ago
268 | 268 | error_status_code=error_status_code, |
269 | 269 | error_headers=error_headers, |
270 | 270 | ) |
271 | warnings.warn( | |
272 | "_on_validation_error hook did not raise an exception and flow " | |
273 | "of control returned to parse(). You may get unexpected results" | |
274 | ) | |
271 | 275 | return data |
272 | 276 | |
273 | 277 | def get_default_request(self): |