remove of upsert 404 error pages into database
This commit is contained in:
@@ -16,12 +16,7 @@ async def not_found(e):
|
|||||||
except LookupError as e:
|
except LookupError as e:
|
||||||
return await to_many_requests(e)
|
return await to_many_requests(e)
|
||||||
|
|
||||||
if request.path.startswith("/api"):
|
|
||||||
return jsonify({"error": "Page Not Found", "message": "Oops! The page you are looking for does not exist."}), 404
|
|
||||||
|
|
||||||
await logger.error(f"[404] Page Not Found: {request.path}")
|
await logger.error(f"[404] Page Not Found: {request.path}")
|
||||||
await current_app.edgedb.upsert_page_not_found(request.path)
|
|
||||||
|
|
||||||
return await render_template('views/basics/error.htm',
|
return await render_template('views/basics/error.htm',
|
||||||
title='Page Not Found',
|
title='Page Not Found',
|
||||||
header={'title': '404 - Page Not Found', 'message': "Oops! The page you are looking for does not exist."},
|
header={'title': '404 - Page Not Found', 'message': "Oops! The page you are looking for does not exist."},
|
||||||
|
|||||||
Reference in New Issue
Block a user