Explorar o código

HUE-5986 [editor] Only serialize expiration message if it is actually some text

Romain Rigaux %!s(int64=8) %!d(string=hai) anos
pai
achega
1facf07
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      desktop/libs/notebook/src/notebook/decorators.py

+ 1 - 1
desktop/libs/notebook/src/notebook/decorators.py

@@ -84,7 +84,7 @@ def api_error_handler(func):
       response['status'] = -2
     except QueryExpired, e:
       response['status'] = -3
-      if e.message:
+      if e.message and isinstance(e.message, basestring):
         response['message'] = e.message
     except AuthenticationRequired, e:
       response['status'] = 401