mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
debug typeerror exceptions
This commit is contained in:
parent
33ef0658ab
commit
2252c23794
1 changed files with 12 additions and 2 deletions
|
@ -460,12 +460,22 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
||||||
in_reply_to = request_json['object']['inReplyTo'] if 'inReplyTo' in request_json['object'] else None
|
in_reply_to = request_json['object']['inReplyTo'] if 'inReplyTo' in request_json['object'] else None
|
||||||
if not in_reply_to:
|
if not in_reply_to:
|
||||||
if can_create_post(user, community):
|
if can_create_post(user, community):
|
||||||
post = create_post(activity_log, community, request_json, user)
|
try:
|
||||||
|
post = create_post(activity_log, community, request_json, user)
|
||||||
|
except TypeError as e:
|
||||||
|
activity_log.exception_message = 'TypeError. See log file.'
|
||||||
|
current_app.logger.error('TypeError: ' + str(request_json))
|
||||||
|
post = None
|
||||||
else:
|
else:
|
||||||
post = None
|
post = None
|
||||||
else:
|
else:
|
||||||
if can_create_post_reply(user, community):
|
if can_create_post_reply(user, community):
|
||||||
post = create_post_reply(activity_log, community, in_reply_to, request_json, user)
|
try:
|
||||||
|
post = create_post_reply(activity_log, community, in_reply_to, request_json, user)
|
||||||
|
except TypeError as e:
|
||||||
|
activity_log.exception_message = 'TypeError. See log file.'
|
||||||
|
current_app.logger.error('TypeError: ' + str(request_json))
|
||||||
|
post = None
|
||||||
else:
|
else:
|
||||||
post = None
|
post = None
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue