0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 00:23:51 +01:00

More warnings about invalid results from AS 3PE query

This commit is contained in:
Paul "LeoNerd" Evans 2016-08-18 17:24:39 +01:00
parent b515f844ee
commit 697872cf08

View file

@ -187,15 +187,20 @@ class ApplicationServicesHandler(object):
ret = [] ret = []
for (success, result) in results: for (success, result) in results:
if not success: if not success:
logger.warn("Application service failed %r", result)
continue continue
if not isinstance(result, list): if not isinstance(result, list):
logger.warn(
"Application service returned an invalid response %r", result
)
continue continue
for r in result: for r in result:
if _is_valid_3pentity_result(r, field=required_field): if _is_valid_3pentity_result(r, field=required_field):
ret.append(r) ret.append(r)
else: else:
logger.warn("Application service returned an " + logger.warn(
"invalid result %r", r) "Application service returned an invalid result %r", r
)
defer.returnValue(ret) defer.returnValue(ret)