Merge pull request #4361 from matrix-org/erikj/better_errors

Don't log stack traces for HTTP error responses
This commit is contained in:
Erik Johnston 2019-01-08 14:19:00 +00:00 committed by GitHub
commit c4530b97b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

1
changelog.d/4361.misc Normal file
View File

@ -0,0 +1 @@
Add better logging for unexpected errors while sending transactions

View File

@ -522,8 +522,13 @@ class TransactionQueue(object):
)
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,