diff --git a/fyle_xero_api/logging_middleware.py b/fyle_xero_api/logging_middleware.py index 3f33394f..a0c43c0c 100644 --- a/fyle_xero_api/logging_middleware.py +++ b/fyle_xero_api/logging_middleware.py @@ -8,6 +8,7 @@ logger = logging.getLogger(__name__) logger.level = logging.INFO + class ErrorHandlerMiddleware: def __init__(self, get_response): self.get_response = get_response @@ -27,9 +28,11 @@ def process_exception(self, request, exception): return HttpResponse("Error processing the request.", status=500) + class LogPostRequestMiddleware: def __init__(self, get_response): self.get_response = get_response + def __call__(self, request): if request.method in ['POST', 'PUT']: try: