@property<EOL><INDENT>def json_rpc_format(self):<DEDENT>
error = {<EOL>'<STR_LIT:name>': text_type(self.__class__.__name__),<EOL>'<STR_LIT:code>': self.code,<EOL>'<STR_LIT:message>': '<STR_LIT>'.format(text_type(self.message)),<EOL>'<STR_LIT:data>': self.data<EOL>}<EOL>if current_app.config['<STR_LIT>']:<EOL><INDENT>import sys, traceback<EOL>error['<STR_LIT>'] = traceback.format_exc()<EOL>error['<STR_LIT>'] = sys.executable<EOL><DEDENT>return error<EOL>
Return the Exception data in a format for JSON-RPC