if "error_message" in fetched:
logger.warning("post_json_api() for 'gql.sources.bka.li' returned error message='%s' - EXIT!", fetched["error_message"])
return 100
+ elif "json" not in fetched:
+ logger.warning("post_json_api() returned fetched[]='%s' with missing 'json' element - EXIT!", type(fetched))
+ return 101
elif isinstance(fetched["json"], dict) and "error" in fetched["json"] and "message" in fetched["json"]["error"]:
logger.warning("post_json_api() returned error: '%s' - EXIT!", fetched["json"]["error"]["message"])
- return 101
+ return 102
rows = fetched["json"]