0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 09:03: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 = []
for (success, result) in results:
if not success:
logger.warn("Application service failed %r", result)
continue
if not isinstance(result, list):
logger.warn(
"Application service returned an invalid response %r", result
)
continue
for r in result:
if _is_valid_3pentity_result(r, field=required_field):
ret.append(r)
else:
logger.warn("Application service returned an " +
"invalid result %r", r)
logger.warn(
"Application service returned an invalid result %r", r
)
defer.returnValue(ret)