[add]: Error handling

This commit is contained in:
VivianDee
2025-03-21 11:18:03 +01:00
parent a73b05054f
commit f2c688c3e8
7 changed files with 59 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
from .handlers import bad_request, method_not_allowed, not_found
+11
View File
@@ -0,0 +1,11 @@
from flask import jsonify
from app.helpers.response_helper import ResponseHelper
def method_not_allowed(error):
return ResponseHelper.method_not_allowed(message="Method Not Allowed")
def not_found(error):
return ResponseHelper.not_found(message="URL Not Found")
def bad_request(error):
return ResponseHelper.bad_request(message="Bad Request")