jira/apps/api/plane/app/views/error_404.py

11 lines
307 B
Python
Raw Permalink Normal View History

# Copyright (c) 2023-present Plane Software, Inc. and contributors
# SPDX-License-Identifier: AGPL-3.0-only
# See the LICENSE file for details.
# views.py
from django.http import JsonResponse
2024-11-21 12:12:44 +00:00
def custom_404_view(request, exception=None):
return JsonResponse({"error": "Page not found."}, status=404)