kkucharc commented on a change in pull request #10909:
URL:
https://github.com/apache/incubator-superset/pull/10909#discussion_r491006420
##########
File path: superset/models/helpers.py
##########
@@ -424,7 +425,10 @@ class ExtraJSONMixin:
def extra(self) -> Dict[str, Any]:
try:
return json.loads(self.extra_json)
- except Exception: # pylint: disable=broad-except
+ except (TypeError, JSONDecodeError) as exc:
+ logger.error(
+ "Unable to load an extra json: %r. Leaving empty.", exc,
exc_info=True
Review comment:
Just to be sure I check that and any of them won't show what
`self.extra_json` contains.
`JSONDecodeError` should something like:
`json.decoder.JSONDecodeError: Unterminated string starting at: line 1
column 11 (char 10)`
with stacktrace.
And `TypeError` something like this for example:
`TypeError: the JSON object must be str, bytes or bytearray, not dict`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]