aboutsummaryrefslogtreecommitdiffstats
path: root/moon_interface/moon_interface/http_server.py
diff options
context:
space:
mode:
authorsgdt6900 <rhanafy.ext@orange.com>2018-01-09 11:33:47 +0200
committersgdt6900 <rhanafy.ext@orange.com>2018-01-10 10:44:44 +0200
commit8f6023b826d8b10e19018c4d0585f87d27314be4 (patch)
tree0fe1ae85d030c341c24eb11724f127ea1a8ec52c /moon_interface/moon_interface/http_server.py
parentdc368bed1ff75f19553046570e1fad2990177783 (diff)
adding comments for some issues and points
refactor retry method apply the comments notes adding test cases adding more comments adding test cases adding more comments , refactoring, tests Change-Id: I0949fcaed2b88f3cf75e66b6a90e6e9d7ca156b1 Signed-off-by: sgdt6900 <rhanafy.ext@orange.com>
Diffstat (limited to 'moon_interface/moon_interface/http_server.py')
-rw-r--r--moon_interface/moon_interface/http_server.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/moon_interface/moon_interface/http_server.py b/moon_interface/moon_interface/http_server.py
index 57170985..82ee5d91 100644
--- a/moon_interface/moon_interface/http_server.py
+++ b/moon_interface/moon_interface/http_server.py
@@ -113,6 +113,13 @@ class HTTPServer(Server):
def get_400_json(e):
return jsonify({"result": False, "code": 400, "description": str(e)}), 400
+
+ '''
+ [Note] i have tried to simulate authz post request (authz_Requests/run) to return 500 response code
+ and an AuthzException thrown from their [Line 63] and catched here , then the server here return response
+ with 403 code [Forbidden] , is it correct if so why sometime at authz [from Line 137] return a response
+ with error code , i think we can do it in the same way as the one mentioned?
+ '''
self.app.register_error_handler(400, lambda e: get_400_json)
self.app.register_error_handler(403, exceptions.AuthException)