[WEB-621] chore: 404 page not found (#3859)
* chore: custom 404 error * chore: moved from middleware to view
This commit is contained in:
parent
5a32d10f96
commit
4572b7378d
3 changed files with 9 additions and 1 deletions
|
|
@ -187,4 +187,6 @@ from .webhook import (
|
|||
from .dashboard import (
|
||||
DashboardEndpoint,
|
||||
WidgetsEndpoint
|
||||
)
|
||||
)
|
||||
|
||||
from .error_404 import custom_404_view
|
||||
|
|
|
|||
5
apiserver/plane/app/views/error_404.py
Normal file
5
apiserver/plane/app/views/error_404.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# views.py
|
||||
from django.http import JsonResponse
|
||||
|
||||
def custom_404_view(request, exception=None):
|
||||
return JsonResponse({"error": "Page not found."}, status=404)
|
||||
Loading…
Add table
Add a link
Reference in a new issue