From 8f6023b826d8b10e19018c4d0585f87d27314be4 Mon Sep 17 00:00:00 2001 From: sgdt6900 Date: Tue, 9 Jan 2018 11:33:47 +0200 Subject: 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 --- moon_interface/moon_interface/http_server.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'moon_interface/moon_interface/http_server.py') 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) -- cgit 1.2.3-korg