14 lines
359 B
Python
14 lines
359 B
Python
from spiderweb.response import JsonResponse
|
|
|
|
|
|
def http403(request):
|
|
return JsonResponse(data={"error": "Forbidden"}, status_code=403)
|
|
|
|
|
|
def http404(request):
|
|
return JsonResponse(data={"error": f"Route {request.url} not found"}, status_code=404)
|
|
|
|
|
|
def http500(request):
|
|
return JsonResponse(data={"error": "Internal server error"}, status_code=500)
|