changeset 1184:eee7a896cf0e

server: show BridgeException traceback on unknown registering status
author Goffi <goffi@goffi.org>
date Tue, 14 May 2019 19:40:51 +0200
parents 3b844004c0b4
children 7d6c0e5d5f34
files libervia/server/server.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/server.py	Tue May 14 19:22:53 2019 +0200
+++ b/libervia/server/server.py	Tue May 14 19:40:51 2019 +0200
@@ -2372,9 +2372,9 @@
         def registered(result):
             return C.REGISTRATION_SUCCEED
 
-        def registeringError(failure):
+        def registeringError(failure_):
             # FIXME: better error handling for bridge error is needed
-            status = failure.value.fullname.split('.')[-1]
+            status = failure_.value.fullname.split('.')[-1]
             if status == "ConflictError":
                 return C.ALREADY_EXISTS
             elif status == "InvalidCertificate":
@@ -2383,8 +2383,8 @@
                 return C.INTERNAL_ERROR
             else:
                 log.error(
-                    _(u"Unknown registering error status: {status}").format(
-                        status=status
+                    _(u"Unknown registering error status: {status}\n{traceback}").format(
+                        status=status, traceback=failure_.value.message
                     )
                 )
                 return status