changeset 793:249e49f56f67

browser and server sides: removed constant UNMANAGED_FAULT_STRING which is used only to be displayed to the user, but it doesn't mean anything to him
author souliane <souliane@mailoo.org>
date Tue, 08 Dec 2015 00:12:51 +0100
parents b993ff0fd02d
children 6a2fd7807770
files src/browser/sat_browser/register.py src/common/constants.py src/server/server.py
diffstat 3 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/sat_browser/register.py	Mon Dec 07 15:56:18 2015 +0100
+++ b/src/browser/sat_browser/register.py	Tue Dec 08 00:12:51 2015 +0100
@@ -223,7 +223,7 @@
             self.login_pass_box.setFocus(True)
             Window.alert(_('An email has been sent to you with your login informations\nPlease remember that this is ONLY A TECHNICAL DEMO.'))
         else:
-            Window.alert(_('Submit error: %s' % result))
+            Window.alert(_("An error occurred and we couldn't process your request. Please report the following error name to the administrators of your network: '%s'" % result))
 
 
 class RegisterBox(PopupPanel):
--- a/src/common/constants.py	Mon Dec 07 15:56:18 2015 +0100
+++ b/src/common/constants.py	Tue Dec 08 00:12:51 2015 +0100
@@ -43,7 +43,6 @@
     NOT_ALLOWED = 'NOT ALLOWED'
     UPLOAD_OK = 'UPLOAD OK'
     UPLOAD_KO = 'UPLOAD KO'
-    UNKNOWN_ERROR = 'UNMANAGED FAULT STRING (%s)'
 
     # directories
     AVATARS_DIR = "avatars/"
--- a/src/server/server.py	Mon Dec 07 15:56:18 2015 +0100
+++ b/src/server/server.py	Tue Dec 08 00:12:51 2015 +0100
@@ -829,8 +829,8 @@
                 log.info(_("Did not receive a reply (the timeout expired or the connection is broken)"))
                 request.write(C.NO_REPLY)
             else:
-                log.error(u'Unmanaged fault string %s in errback for the connection of profile %s' % (fault, profile))
-                request.write(C.UNKNOWN_ERROR % fault)
+                log.error(u'Unmanaged fault string "%s" in errback for the connection of profile %s' % (fault, profile))
+                request.write(fault)
             request.finish()
 
         self.waiting_profiles.setRequest(request, profile)
@@ -847,7 +847,7 @@
             - C.BAD_REQUEST: something is wrong in the request (bad arguments)
             - C.REGISTRATION_SUCCEED: new account has been successfully registered
             - C.ALREADY_EXISTS: the given profile already exists
-            - C.INTERNAL_ERROR or C.UNKNOWN_ERROR
+            - C.INTERNAL_ERROR or any unmanaged fault string
             - server.NOT_DONE_YET: the profile is being processed, the return
                 value will be given later (one of those previously described)
         """
@@ -875,7 +875,7 @@
                 request.write(C.INTERNAL_ERROR)
             else:
                 log.error(u'Unknown registering error: %s' % (reason,))
-                request.write(C.UNKNOWN_ERROR % reason)
+                request.write(reason)
             request.finish()
 
         d = self.asyncBridgeCall("registerSatAccount", email, password, profile)