Skip to content

Commit

Permalink
Create errors.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH committed May 11, 2024
1 parent c287a39 commit 70f7f60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# web/errors.py
from flask import jsonify

@app.errorhandler(404)
def not_found(error):
return jsonify({'error': 'Not found'}), 404

0 comments on commit 70f7f60

Please sign in to comment.