Open sevdog opened 6 days ago
Looking at request.py, it looks like there is already a precedent for handling this type of error with the wrap_attributeerror
context manager defined at https://github.com/encode/django-rest-framework/blob/master/rest_framework/request.py#L68 and then used at
I've opened another PR (#9455) that utilizes this context manager through a safe_property
decorator that is utilized by each of the properties in the Request
class.
Description
To address #9433 (which is caused by https://github.com/python/cpython/issues/90143) simply wraps
AttributeErrors
which are raised in the parse process into aParseError
.