misc: do not log invalid json content error if log_errors is False (#22661)
This commit is contained in:
parent
1933eb6a9f
commit
8796c9892a
|
@ -961,7 +961,10 @@ class JsonCellBase(CellBase):
|
|||
except ValueError:
|
||||
extra_context[data_key + '_error'] = 'invalid_json'
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.error('invalid json content (%s)', url)
|
||||
if log_errors:
|
||||
logger.error('invalid json content (%s)', url)
|
||||
else:
|
||||
logger.debug('invalid json content (%s)', url)
|
||||
continue
|
||||
elif json_response.headers.get('content-type') == 'application/json':
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue