Using:
- django 3.1.3
- djangorestframework 3.12.2
I've been trying to get `handler500` to work with `@api_view` decorator.
## Steps to reproduce
provide the view like so
populate file core/util/response.py
```
from rest_framework.decorators import api_view
from rest_framework.response import Response
@api_view(["GET"])
def handler500(request):
payload = {"message": "system error", "success": False, "data": None }
return Response(data=payload, status=500, exception=True)
```
populate file app/urls.py
```
handler500 = "core.util.response.handler500"
```
and then starting Django with
```
```
## Expected behavior
starts Django successfully (with handler500 able to be used)
## Actual behavior
Django crashes on start up with the following error
```
ERRORS:
?: (urls.E007) The custom handler500 view 'core.util.response.WrappedAPIView' does not take the correct number of arguments (request).
System check identified 1 issue (0 Silenced).
```
## Additional notes:
I am able to use the above with `handler404` without issue (and it works as expected), for `handler500` I have to use `django.http.HttpResponse` instead.