From 70f7f60b81f8bb45f60f0b8c7b79e6d81e149f43 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 11 May 2024 13:52:10 +0700 Subject: [PATCH] Create errors.py --- web/errors.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 web/errors.py diff --git a/web/errors.py b/web/errors.py new file mode 100644 index 0000000..abdc92b --- /dev/null +++ b/web/errors.py @@ -0,0 +1,6 @@ +# web/errors.py +from flask import jsonify + +@app.errorhandler(404) +def not_found(error): + return jsonify({'error': 'Not found'}), 404