Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4361 from matrix-org/erikj/better_errors
Browse files Browse the repository at this point in the history
Don't log stack traces for HTTP error responses
  • Loading branch information
erikjohnston authored Jan 8, 2019
2 parents b970cb0 + 83c50bf commit c4530b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/4361.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add better logging for unexpected errors while sending transactions
7 changes: 6 additions & 1 deletion synapse/federation/transaction_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,13 @@ def _transaction_transmission_loop(self, destination):
)
except FederationDeniedError as e:
logger.info(e)
except HttpResponseException as e:
logger.warning(
"TX [%s] Received %d response to transaction: %s",
destination, e.code, e,
)
except RequestSendFailed as e:
logger.warning("(TX [%s] Failed to send transaction: %s", destination, e)
logger.warning("TX [%s] Failed to send transaction: %s", destination, e)

for p, _ in pending_pdus:
logger.info("Failed to send event %s to %s", p.event_id,
Expand Down

0 comments on commit c4530b9

Please sign in to comment.