소스 검색

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

Romain Rigaux 8 년 전
부모
커밋
1facf07
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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