DRF don't raise 404 error when the url is not found #8199
Unanswered
mojixcoder
asked this question in
Potential Issue
Replies: 1 comment 1 reply
-
Seems like the issue is that your custom You'll probably need to change your code to something like this... def get_permissions(self):
return self.permissions.get(self.action, default=[]) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I include
router.urls
in my app.Everything is fine when urls are called correctly.
But when I call an non-existing URL I don't get 404 error, and I get 500 instead.
Here is my error:
It's clear that there is no action for this url!!!
and when I comment this method i get 401 instead because all of my pages are
IsAuthenticated
by default.When I call
.../v1/accounts/blablbalba/
I get 500.Here is my
urls.py
:And It is my
apis.py
:Beta Was this translation helpful? Give feedback.
All reactions