From 6e9c8fc1fa0058611a741118a8179d7e8fb90b61 Mon Sep 17 00:00:00 2001 From: Christos Stavrakakis Date: Thu, 11 Oct 2012 12:06:51 +0300 Subject: [PATCH] Log 5xx API faults --- snf-pithos-app/pithos/api/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snf-pithos-app/pithos/api/util.py b/snf-pithos-app/pithos/api/util.py index be785f9..5b15c6c 100644 --- a/snf-pithos-app/pithos/api/util.py +++ b/snf-pithos-app/pithos/api/util.py @@ -918,6 +918,8 @@ def api_method(http_method=None, format_allowed=False, user_required=True): update_response_headers(request, response) return response except Fault, fault: + if fault.code >= 500: + logger.exception("API Fault") return render_fault(request, fault) except BaseException, e: logger.exception('Unexpected error: %s' % e) -- 1.7.10.4