changeset 60:ae377f7eed18

Add ErrorResponse class for resposes after an error has occured during the merge
author Björn Ricks <bjoern.ricks@intevation.de>
date Wed, 12 Nov 2014 12:40:31 +0100
parents 2dacbe7fb7f9
children d8fc52aceb9c
files odfcast/convert.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/odfcast/convert.py	Wed Nov 12 12:38:37 2014 +0100
+++ b/odfcast/convert.py	Wed Nov 12 12:40:31 2014 +0100
@@ -94,6 +94,16 @@
             html_error_code=500)
 
 
+class MergeErrorResponse(ErrorResponse):
+
+    MERGE_ERROR_CODE = 300
+
+    def __init__(self, details, error_code=MERGE_ERROR_CODE):
+        super(MergeErrorResponse, self).__init__(
+            title="MergeError", error_code=error_code, details=details,
+            html_error_code=500)
+
+
 class ConvertView(MethodView):
 
     def __init__(self, pyuno_driver_name="", hostname="localhost", port=2001):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)