diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-05-18 18:41:10 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-05-18 18:41:10 +0300 |
| commit | fc05261b988b30ba1cbe1747fd2bcc736abcbc23 (patch) | |
| tree | 28d07041349e8dee1888366c91ad86c895f46090 /src | |
| parent | 272693073aed48d779fbfb8bf655d4e395f6761d (diff) | |
common_rest_req_exception_handler: send back rzdoc_name on RZDoc_Exception__not_found
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/rz_kernel.py | 1 | ||||
| -rw-r--r-- | src/server/rz_req_handling.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/server/rz_kernel.py b/src/server/rz_kernel.py index 5c6eb0bb..e2b54c4b 100644 --- a/src/server/rz_kernel.py +++ b/src/server/rz_kernel.py @@ -27,6 +27,7 @@ class RZDoc_Exception__not_found(Exception): def __init__(self, rzdoc_name): super(RZDoc_Exception__not_found, self).__init__('rzdoc not found: \'%s\'' % (rzdoc_name)) + self.rzdoc_name = rzdoc_name class RZDoc_Exception__already_exists(Exception): diff --git a/src/server/rz_req_handling.py b/src/server/rz_req_handling.py index 106d249d..b39d7c0c 100644 --- a/src/server/rz_req_handling.py +++ b/src/server/rz_req_handling.py @@ -72,7 +72,7 @@ def common_rest_req_exception_handler(rest_API_endpoint): return common_resp_handle__client_error(error=e) # currently blame client for all DNFs except RZDoc_Exception__not_found as e: log.exception(e) - return common_resp_handle__client_error(error=e) # currently blame client for all DNFs + return common_resp_handle__client_error(data={'rzdoc_name': e.rzdoc_name}, error=e) # currently blame client for all DNFs except Exception as e: log.exception(e) return common_resp_handle__server_error(error=e) |
